-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Improve stacking performance and footprint #6762
Conversation
const dataset = me.getDataset(); | ||
const xid = meta.xAxisID = dataset.xAxisID || getFirstScaleId(chart, 'x'); | ||
const yid = meta.yAxisID = dataset.yAxisID || getFirstScaleId(chart, 'y'); | ||
meta.xScale = me.getScaleForId(xid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a really good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think we should store iScale
and vScale
here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably
const dataset = me.getDataset(); | ||
const xid = meta.xAxisID = dataset.xAxisID || getFirstScaleId(chart, 'x'); | ||
const yid = meta.yAxisID = dataset.yAxisID || getFirstScaleId(chart, 'y'); | ||
meta.xScale = me.getScaleForId(xid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think we should store iScale
and vScale
here as well?
Forgot to mention the leading idea: in |
Added vScale / iScale. Also replaced getMeta() with _cachedMeta. Updated bunch of |
Performance
Master
PR
About ~200ms improvement overall in uPlot stacked (~950ms -> ~750ms).
Memory
Master
PR