Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine memory-size of IMap should not iterate over all records #6442

Closed
pveentjer opened this issue Oct 13, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@pveentjer
Copy link
Member

commented Oct 13, 2015

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.

@gurbuzali

This comment has been minimized.

Copy link
Member

commented Jan 18, 2016

Check SizeEstimator interface, it is already done as you've suggested for IMap

@pveentjer

This comment has been minimized.

Copy link
Member Author

commented May 6, 2016

Closing this ticket since it s already implemented.

@pveentjer pveentjer closed this May 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.