Performance optimization for CategoryAxisRenderer: Avoid Forced Layouts#180
Open
strfry wants to merge 1 commit intojqPlot:masterfrom
Open
Performance optimization for CategoryAxisRenderer: Avoid Forced Layouts#180strfry wants to merge 1 commit intojqPlot:masterfrom
strfry wants to merge 1 commit intojqPlot:masterfrom
Conversation
Member
|
Thank you Jonathan! This looks like an awesome improvement to jqplot. Will need to investigate a little further. Wondering if the css left call should be replaced with a translate call too? |
Author
|
@johanbove I'm not sure i understand what you mean. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was hitting a performance issue, where a graph redraw with ~12000 elements took over 20 seconds to render on Firefox and Chrome. With the new optimization, it came down to a few seconds.
With their performance profilers, i traced this down to CategoryAxisRenderer. The combination of setting CSS ('left'), and getWidth() is triggering a layout recalculation for each of the 12000 elements.
This can be cut down to only a handful, when those elements with 0 width do not get positioned.
This could also be applicable to other AxisRenderers. There might be even a better way to ignore those axis ticks that are not rendererd anyway.
I didn't test beyond my application, so i can't say for sure that this code change is sound.