Will the loginTimeMap slow the server if the size of the map exceed 10000?
A HashMap
has a time complexity of O(1)
. That is, it hashes, then goes straight to the value. It does not search for the value. That means that it's performance is not proportional to the amount of elements in the array, although with 10,000 entries it might be somewhat memory heavy!