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

Reduce object allocations for Cluster topology parsing #1069

Closed
mp911de opened this issue Jun 26, 2019 · 0 comments
Closed

Reduce object allocations for Cluster topology parsing #1069

mp911de opened this issue Jun 26, 2019 · 0 comments
Labels
type: feature A new feature
Milestone

Comments

@mp911de
Copy link
Collaborator

mp911de commented Jun 26, 2019

ClusterPartitionParser.parse(…) leads to a lot of object allocations for Integer objects caused by slot objects. We should switch to BitSet (similar to what RedisClusterNode does).

Also, Partitions.updateCache(…) suffers from a similar issue when obtaining slots for the cache update.

@mp911de mp911de added this to the 5.2.0 milestone Jun 26, 2019
@mp911de mp911de added the type: feature A new feature label Jun 26, 2019
mp911de added a commit that referenced this issue Jun 26, 2019
Cluster topology refresh now has reduced object allocation overhead by using a bit set for initial parsing of slots.

Topology object iteration also uses loops again instead of Java 8 Stream API.
@mp911de mp911de closed this as completed Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

No branches or pull requests

1 participant