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

Only use Entry ID<->index maps if necessary #141

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbuch
Copy link
Contributor

@rbuch rbuch commented Sep 16, 2021

In the common case, Entry IDs and indices are both contiguous and
start from 0, so these maps are just the identity function. ID->index
conversion is on the hot path for drawing Timeline and the
boxing/unboxing and map lookup can be relatively costly, so avoid it
when possible.

@rbuch rbuch force-pushed the ronak/avoid-id-index-maps branch from a1716e1 to 09ab391 Compare September 16, 2021 05:13
@lgtm-com
Copy link

lgtm-com bot commented Sep 16, 2021

This pull request introduces 1 alert when merging 09ab391 into 8ca8a8c - view on LGTM.com

new alerts:

  • 1 for Boxed variable is never null

@rbuch rbuch marked this pull request as draft September 16, 2021 07:56
In the common case, Entry IDs and indices are both contiguous and
start from 0, so these maps are just the identity function. ID->index
conversion is on the hot path for drawing Timeline and the
boxing/unboxing and map lookup can be relatively costly, so avoid it
when possible.
@matthiasdiener matthiasdiener force-pushed the ronak/avoid-id-index-maps branch from 09ab391 to eb0d1ca Compare May 16, 2024 20:36
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.

1 participant