Comments (9)
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.
See also jquery-archive/PEP#92
from the-graph.
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.
Regarding multiple gesture recognizers, things should be a lot more efficient when we have get the-grid/the-behavior#2
from the-graph.
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?
from the-graph.
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.
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
from the-graph.
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.
fixing in pointergestures
from the-graph.
Related Issues (20)
- Dragging to move nodes, create edges unreliable on mouse HOT 2
- Touch-only input broken HOT 3
- Missing dist/ in NPM package HOT 3
- Make icon map loadable via CommonJS HOT 1
- Cannot move viewport using thumbnail HOT 4
- `Nested transactions not supported` error HOT 2
- [Question] Do something on edge creation HOT 4
- editor.addErrorNode is not a function
- React16 port HOT 7
- Publish version with latest changes HOT 7
- Node.js tests failing HOT 10
- installing dependecies on linux fails HOT 2
- canvas-prebuilt dependency is no more HOT 2
- Roadmap of this Library HOT 1
- TS typing HOT 1
- Can't resolve 'fs' when using react component
- 'editor' is not defined, and unable to access editor methods in react hooks HOT 2
- Cannot read properties of undefined (reading 'length') HOT 3
- how do I use its `triggerFit` method in react 18? HOT 3
- Nav minimap can't drag properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from the-graph.