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

X-Range performance improvements #1016

Merged
merged 1 commit into from
Dec 13, 2023
Merged

X-Range performance improvements #1016

merged 1 commit into from
Dec 13, 2023

Conversation

AaronPlave
Copy link
Contributor

@AaronPlave AaronPlave commented Nov 27, 2023

Caches x-range text measurements. Drastically improves x-range drawing speed in certain cases. Also changes the x-range font to Inter.

Related to #959.

Test by loading a view with many x-range plots that have multiple different segments. Profile the application and ensure that x-ranges do not spend a long time computing text measurements.

@AaronPlave AaronPlave requested a review from a team as a code owner November 27, 2023 17:00
@AaronPlave AaronPlave self-assigned this Nov 27, 2023
@AaronPlave AaronPlave added the performance A code change that improves performance label Nov 27, 2023
Copy link
Contributor

@jeffpamer jeffpamer left a comment

Choose a reason for hiding this comment

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

I haven't tested this against a very large segmented x-range yet, just confirmed the labels behave as expected on a smaller plan. But I think these changes are straightforward and would be a pretty obvious improvement.

Copy link
Collaborator

@duranb duranb left a comment

Choose a reason for hiding this comment

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

Was able to verify that the caching significantly reduces the number of calls to measureText. 🎉

@AaronPlave AaronPlave merged commit 55241e0 into develop Dec 13, 2023
@AaronPlave AaronPlave deleted the feat/x-range-perf branch December 13, 2023 00:42
JosephVolosin pushed a commit that referenced this pull request Aug 20, 2024
* Cache x-range text measurements to improve x-range rendering performance
* Use Inter for x-range labels
JosephVolosin pushed a commit that referenced this pull request Oct 21, 2024
* Cache x-range text measurements to improve x-range rendering performance
* Use Inter for x-range labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance A code change that improves performance
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants