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

Regression bug: LASSOing has become significantly slower #1216

Closed
daattali opened this issue Mar 8, 2018 · 4 comments
Closed

Regression bug: LASSOing has become significantly slower #1216

daattali opened this issue Mar 8, 2018 · 4 comments

Comments

@daattali
Copy link

daattali commented Mar 8, 2018

This was introduced some time between 2018-01-26 to 2018-03-07

Here's a plot of 10,000 points:

df <- data.frame(x = runif(10000, min = 0, max = 20000), y = runif(10000, min = 0, max = 20000))
plot_ly(df, x = ~x, y= ~y) %>% add_markers()

Running this 2 months ago, I was able to LASSO points with no problem. Now it's essentially unusable.

Converting it to toWebGL() helps, but is still much slower than it was before.

See video below for comparisons

calculatingkindgar-max-14mb

(related to #1211)

@cpsievert
Copy link
Collaborator

Strange. Again, this might be Windows-specific weirdness.

To help isolate the issue, it would be great if you could (try to) replicate these issues with pure plotly.js. I have a codepen here where you can switch scatter to scattergl to switch from SVG to WebGL. Also, feel free to play with different versions (version 1.33.0 was when the scattergl rewrite happened) https://codepen.io/cpsievert/pen/WzNvVN

PS. I'm fairly sure lasso selection in scatter has always been sluggish with this many points. Here is a minimal example with plotly.js 1.30.0 (Aug 21, 2017). When I compare that to 1.35.0 (current version), there isn't much of a noticeable difference -- https://codepen.io/cpsievert/pen/wmvaeQ

@daattali
Copy link
Author

daattali commented Mar 8, 2018

Thanks for providing the biolerplate js code, even though it's that simple it would have taken me a long time to come up with it as I'm not familiar at all with plotly.js

@cpsievert
Copy link
Collaborator

Closing as this seems fixed plotly/plotly.js#2459 (comment)

@daattali
Copy link
Author

daattali commented Jun 6, 2018

Yep it's better in a browser! Within RStudio it's agonizingly slow, but in a browser it's all good now

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

No branches or pull requests

2 participants