IMap.keySet() fetches both keys and values #4642

jerrinot opened this Issue Feb 19, 2015 · 4 comments


None yet

6 participants


keySet() relies on QueryOperation. The QueryOperation doesn't accept IterationType - it always returns both keys & values. This can lead to unnecessary load and potentially even OOM.

It's especially painful when values are larger than keys.

kudos to @Donnerbart for pointing this out!


Is this also an issue with map.values? So you are only interested in values, but do you get the keys as well?


good point @Donnerbart 👍

@metanet metanet added Team: Core and removed Team: Core labels Mar 3, 2015
@ahmetmircik ahmetmircik added this to the 3.5 milestone Mar 18, 2015
@gurbuzali gurbuzali modified the milestone: 3.6, 3.5 May 12, 2015

I will close this one in favor of #5634, since it has some test code.

@Donnerbart Donnerbart closed this Jun 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment