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

Performance improvements for canvas #1186

Merged
merged 4 commits into from
Apr 6, 2016
Merged

Performance improvements for canvas #1186

merged 4 commits into from
Apr 6, 2016

Conversation

davkal
Copy link
Contributor

@davkal davkal commented Mar 18, 2016

Fixes #1034

  • made some components stateless
  • added pure-render mixin to pure components
  • split up node chart components
  • removed dynamic font sizing

@foot
Copy link
Contributor

foot commented Mar 21, 2016

Wicked! So Snapppppy w/ lower node counts now.

  • If you select a node, then click bg to deselect it often fails to return to the canvas due to the violation of the assumption we have max of 30 points on a line (I've seen 45 points and 61 points on a 500node layout). It would be neat to make this dynamic but I dunno how...
  • Topo layout animations at high node counts are a bit janky and painful to sit through, especially at the end when they appear to have finished but are still churning tiny distances. Maybe disabling them at some point might give a nicer ux. The highlighting animations behave alright even at high node counts though.
  • 998 new nodes took too long to layout on the highly connected data the debugbar generates. (2-3mins then hit pause and saw it stuck in the layout code). 500nodes took about 20s to layout. Maybe set the limit to 300-500 for now.

@davkal
Copy link
Contributor Author

davkal commented Mar 21, 2016

If you select a node, then click bg to deselect it often fails to return to the canvas due to the violation..

#1187

Topo layout animations at high node counts are a bit janky and painful to sit through...

Will add dynamic coords precision based on topo size in this PR.

998 new nodes took too long to layout on the highly connected data...

#1188

@foot foot assigned davkal and unassigned foot Mar 22, 2016
@davkal
Copy link
Contributor Author

davkal commented Mar 22, 2016

Found that edge points are not immutable yet. working on that in this PR.

@davkal
Copy link
Contributor Author

davkal commented Mar 22, 2016

@foot I added the precision optimization, as well as making edge points immutable. PTAL

@davkal davkal assigned foot and unassigned davkal Mar 22, 2016
@foot
Copy link
Contributor

foot commented Mar 23, 2016

There might be a bit of a perf regression in the latest HEAD, dragging around the canvas is quite slow, I think it should be able to get away w/ only updating the svg element.

@davkal davkal changed the title Performance improvements for canvas [WIP] Performance improvements for canvas Mar 24, 2016
@davkal davkal force-pushed the pure-mixin branch 3 times, most recently from d78fef1 to 4c553b8 Compare April 4, 2016 10:32
Add debug.html to show toolbar

Perfjankie test runner

Playing w/ the pure mixin for perf. improvements

* Works well! Smoother zooming/panning when things have settled.
* Extract node movement to node-container, make nodes pure

Extracted node chart elements into own components

Keep control objects immutable while in components

Keep layout state objects alive

Made other components pure, removed mixin from stateless components

Remove font size adjustment from scaling

Fix zoomscale

Move node transform to node

* makes more sense there because the coords are rounded in the container

dynamic coords precision based on topology size

Make edge points immutable

Remove nodes maximum for layout engine

Dont send all canvas state down to next component

moving layout handling back to nodes-chart.js

Omit some props for edges/nodes, dont animate edges on low precision

Moved AppStore access out of lower components
@davkal davkal changed the title [WIP] Performance improvements for canvas Performance improvements for canvas Apr 5, 2016
@davkal davkal merged commit f34146d into master Apr 6, 2016
@davkal davkal deleted the pure-mixin branch April 6, 2016 12:23
davkal added a commit that referenced this pull request Apr 6, 2016
Introduced in #1186

Fixes #1233
davkal added a commit that referenced this pull request Apr 11, 2016
Fixes regression introduced by #1186 (comparing wrong layout state
objects)

Fixes #1242
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