Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Determine memory-size of IMap should not iterate over all records #6442
To determine the memory size of an IMap is done by iterating over all map entries and therefor has complexity of O(N) with N being the number of entries. This should be reduced to O(1) by updating the size on every change made on a map.
Chewing through all member is bad.. it will hog a thread for a long time.. it will polute the caches. This is done done periodically to update the management center.
Other data-structures like ICache should be checked as well.