Coder Social home page Coder Social logo

pointer event performance about the-graph HOT 9 CLOSED

flowhub avatar flowhub commented on September 26, 2024
pointer event performance

from the-graph.

Comments (9)

bergie avatar bergie commented on September 26, 2024

I wouldn't start performance tuning this part quite yet, and in any case part of it might be the fact that we have multiple gesture recognizers running on the same element (one for each the-behavior).

Node moving will feel quite different when we start snapping them to grid, as well.

from the-graph.

bergie avatar bergie commented on September 26, 2024

See also jquery-archive/PEP#92

from the-graph.

dfreedm avatar dfreedm commented on September 26, 2024

Feel free to file a performance bug if you determine that this is in PointerEvents.
FWIW, I refactored some low hanging fruit recently (jquery-archive/PEP#102) and only just now pushed it to bower.

from the-graph.

bergie avatar bergie commented on September 26, 2024

Regarding multiple gesture recognizers, things should be a lot more efficient when we have get the-grid/the-behavior#2

from the-graph.

forresto avatar forresto commented on September 26, 2024

Seems a little better with the-behaviors, but still <30hz. Wondering why we're getting more than one mousemove event per frame, and why they are so expensive. Does it make sense that we are doing more mousemove calculations than screen updates?
screen shot 2013-10-19 at 8 05 44 am

from the-graph.

bergie avatar bergie commented on September 26, 2024

One reason can be that we're currently setting a drag="x y" attribute to
the node being dragged.

This causes the dragChanged method to be called on the web component. But
since the attribute change notifications are asynchronous in Polymer, this
could be a reason why we miss moves.

from the-graph.

forresto avatar forresto commented on September 26, 2024

Tried using https://github.com/Polymer/PointerGestures instead of the-behavior. Seemed like a big improvement. On mobile, panning went from 140ms to 60ms.

Test in new branch: https://github.com/the-grid/the-graph/tree/pointergestures

noflo
drag-noflo
polymer
drag-polymer

from the-graph.

bergie avatar bergie commented on September 26, 2024

I think big part of this is that we still run the whole gesture data gathering operation after each pointermove, while we really are only interested in the coordinates moved (and gesture end). It might make sense to set up a shortcut earlier in the flow than we now do once gesture has been detected. We really don't need things like angle, distance, and speed after that.

from the-graph.

forresto avatar forresto commented on September 26, 2024

fixing in pointergestures

from the-graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.