-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
point-cluster for scattergl #2493
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
Conversation
// create scatter instance by cloning scatter2d | ||
scene.select2d = createScatter(fullLayout._glcanvas.data()[1].regl, {clone: scene.scatter2d}); | ||
// create select scatter instance by cloning scatter2d | ||
scene.select2d = createScatter(fullLayout._glcanvas.data()[1].regl); |
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.
Since we reuse clustering, creating new scatter is way faster, we don't need to clone data.
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.
sweet!
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.
... which makes switching from zoom/pan to select/lasso drag modes waaay faster. Thanks!
Thanks @dfcreative ! We should probably apply those commits on top of #2492 to avoid conflicts. |
src/traces/scattergl/index.js
Outdated
if(errorOpts.copy_ystyle) { | ||
errorOpts = trace.error_y; | ||
} | ||
if (!trace.unselected) unselectedOptions.opacity = DESELECTDIM; |
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.
Why do we need this all of a sudden?
I'm seeing ~200ms improvements in first-render speed at 1e6 pts (from 1400-1500 down to ~1200ms) which is pretty amazing 🎉 That said, on my machine drag and selection appear slower off this branch. Maybe one or a few dependencies haven't been updated properly. Oh wait! Yeah, this branch is still using the |
with d972023, the first-render improvements are even better, I'm getting <1000ms first-render time at 1e6 pts which is nothing short of outstanding 🎉 That said, yeah I'm still experiencing slow drag and selections. @dfcreative maybe we'll need to update parts of update routine. |
@dfcreative I made scattergl-dry-convert...point-cluster-dev which I think captures of the required updates in scattergl and scatterpolargl of this branch and applies them to #2492 to avoid conflicts down the road. I suggest closing this PR and working off |
@dfcreative Here are some problems I noticed off scattergl-dry-convert...point-cluster-dev :
|
as for the jasmine tests, a few tests (6 in total) are failing due to the |
This PR includes improvement on regl-scatter2d & introduces point-clustering.
Btw selection, panning & updating are significantly faster.
Clustering is somewhat faster.
Introducing async clustering - later.
cc @etpinard