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

Look for ways to improve big-data axis-expand algo #2417

Closed
etpinard opened this issue Feb 28, 2018 · 1 comment
Closed

Look for ways to improve big-data axis-expand algo #2417

etpinard opened this issue Feb 28, 2018 · 1 comment
Labels
feature something new

Comments

@etpinard
Copy link
Contributor

... most notably for scattergl, but also perhaps for all traces types that support data arrays with length greater than 1e5 in the future.

From @alexcjohnson in #2404 (comment) :

How did you find sizeAvg to work in practice? A little hard to say I guess, since we don't have a lot of real data > 1e5 points to play with... You're right that we don't want to just use sizeMax, it's worth accepting a bit of clipping in order to generally have less wasted space, and much of the time the largest point won't be on any edge... just wondering how that balance plays out in practice, whether we would be better off with something like halfway between the average and max.

Anyway perhaps we don't have a god way to answer that question right now. I'll just mention that in case we do want to try and do better later, we could find some heuristics that only add a little bit of computation, like binning data points into top/middle/bottom thirds, and only using the top third for the top padding... maybe even with a smooth weighting of the size based on how far it is from the edge. That would still be far faster than the full calculation but could do a better job reducing wasted space without too much clipping.

@alexcjohnson
Copy link
Collaborator

From #2437 (comment):

In comparison, at 1e5 - 1 pts (i.e. below the big-data threshold), we get:

image

@alexcjohnson I'll reference #2417 - but honestly feel free to close it if you think Axes.expand is satisfactory now.

Any improvement we make at this point will come with both a performance cost and a loss of generality - so lets close for now, and reopen if we hit a specific use case where the current behavior isn't good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

2 participants