No scattergl clustering below 1e5 pts#3578
Merged
Conversation
- note that to do so for 1e4 < pts < 1e5, we must set the regl-scatter2d "snap" option too 1e5 (aka TOO_MANY_POINTS) as regl-scatter2d uses a dflt value of 1e4.
... now featuring a better rendering.
Contributor
Author
Contributor
|
Excellent! Thanks. |
etpinard
added a commit
that referenced
this pull request
Sep 23, 2019
- post #3578 all scattergl traces either set a `tree` or and `ids` array during the calc step.
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.
An attempts at fixing #2334 by skipping point clustering (done by
point-cluster) forscattergltraces with less than 1e5 pts.Previously, we were subject to the
regl-scatter2ddefault value of1e4meaningscattergltraces with more than 1e4 pts but less than 1e5 pts (ourTOO_MANY_POINTSconstant) were clustered fromregl-scatter2dwhereas traces with more than 1e5 pts were clustered fromScattergl.calc.With the PR, I noticed that panning is slightly slower for graphs 1e4 < pts < 1e5, but otherwise performance appears the same. I think this small performance lost is worth it to get the correct rendering and to make us call
point-clusterfrom one place i.e. fromScattergl.calc.Here are some updated codepens from #2334:
We may eventually still want to lower the
maxDepthclustering option as @dy has suggested in #2334 (comment) to potentially correct rendering of traces with > 1e5 pts, but I'd like to wait to find a currently failing example before doing so. We could also try to bring back clustering for 1e4 < pts < 1e5 traces together with a lowermaxDepthdown the road.cc @plotly/plotly_js I'd like to slide to in the 1.45.0 - as this PR may have consequences I don't want to release in a patch version.