Skip to content

Skip sorting in compact when there are no removals/replacements - #847

Open
spjegan wants to merge 5 commits into
Netflix:masterfrom
spjegan:fixes/compactImprovements
Open

spjegan wants to merge 5 commits into
Netflix:masterfrom
spjegan:fixes/compactImprovements

Conversation

@spjegan

@spjegan spjegan commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Each producer cycle unconditionally sorts the ordinal map for each type as part of prepareForNextCycle. This sorting can be skipped when there are no removed/replaced ordinals in a cycle. Flame graph from an internal cycle

Screenshot 2026-08-10 at 12 47 00 PM

@spjegan spjegan self-assigned this Aug 10, 2026

@azeng-netflix azeng-netflix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment thread hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java Outdated
Comment thread hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java Outdated
Comment thread hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java Outdated
@spjegan spjegan changed the title Skip compact when there are no removals/replacements Skip sorting in compact when there are no removals/replacements Aug 18, 2026
Comment thread hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java Outdated
Comment thread hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java Outdated
Comment thread hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java Outdated
Comment thread hollow/src/main/java/com/netflix/hollow/core/memory/ByteArrayOrdinalMap.java Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants