Skip to content

Bypassing most of the heavy lifting in the rAF for when there's no interaction - #731

Merged
etpinard merged 2 commits into
plotly:masterfrom
monfera:raf-lighten
Jul 11, 2016
Merged

Bypassing most of the heavy lifting in the rAF for when there's no interaction#731
etpinard merged 2 commits into
plotly:masterfrom
monfera:raf-lighten

Conversation

@monfera

@monfera monfera commented Jul 9, 2016

Copy link
Copy Markdown
Contributor

Solves the symptoms of #730 in that it reduces idle CPU utilization from 100% to around 5% at 500k-1m data points (as measured even for non-fancy 2d WebGL scatterplot)

Comment thread src/plots/gl2d/scene2d.js Outdated
var selection = this.lastPickResult = nextSelection;
var selection = nextSelection;
this.lastPickResult = {
trace: nextSelection.trace, // could we just retain/compare the trace uid?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we just retain/compare the trace uid?

I think so. @monfera can you try?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard Yes it works. Made the change, checked tooltip and CPU behavior (all OK), pushed.

@etpinard

Copy link
Copy Markdown
Contributor

that it reduces idle CPU utilization from 100% to around 5% at 500k-1m data points

Great work. Thanks very much.

… lastPickResults

(cherry picked from commit a2efeb4)
@etpinard

Copy link
Copy Markdown
Contributor

@monfera thanks!

@etpinard
etpinard merged commit d96e5e1 into plotly:master Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants