Comments (5)
@Keavon I'm not really sure how we can do this. If we have f(Footprint) = disk sampled points
and want to avoid doing the disk sampling many times, then how can we be sure that changing the footprint won't impact the result?
If we actually implemented the cull node, then changing the footprint by panning around would certainly impact the result - so if the shape was initially outside the viewport and we cached the empty result, then that would not be ideal.
from graphite.
If we actually implemented the cull node, then changing the footprint by panning around would certainly impact the result - so if the shape was initially outside the viewport and we cached the empty result, then that would not be ideal.
The idea of resolution aware caching would be that we only reuse the cached result if the outcome would be the same and otherwise recompute. The click targets are a bit more tricky to update but that's the basic idea
from graphite.
@TrueDoctor How do we know if the "outcome would be the same" without computing the outcome?
from graphite.
@TrueDoctor wrote in Discord:
There are basically two possible ways of going about this:
- Fix the performance and actually make everything fast enough to be executed in real time
- Change how click targets are propagated:
If instead of just storing the click targets in the monitor nodes, we instead attach the click targets to the data type, we can modify the click target in the cache node.
When the user then pans around in the viewport and we know that the data we have cached is basically still correct, we could modify the click target in the cache node to reflect the proper location.But I honestly think that we really should not need to rely on caching for purely vector data. There are a bunch of potential optimizations we can do which should could speed this up (e.g. eliminating unnecessary clones etc.)
from graphite.
For 1, this is quite challenging given that poisson disk sampling inherently requires quite a lot of allocation and computation. A popular algorithm for fast poisson disk sampling is https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf. I have also noticed that the code for sampling based on Euclidean distance is very inefficient and I might try and improve that sometime. However even with the current total caching currently we get a frame time of 80ms or ~12fps which doesn't really give a lot of room for these algorithms to run in real time.
For 2, I'm not sure how this is relevant as click targets are stored in document space so don't change as the user pans around the document.
from graphite.
Related Issues (20)
- "Flip" view navigation button HOT 1
- Fix Deep/Shallow selection regression HOT 1
- Can't drag selected layers. HOT 2
- Caching the WASM using service workers HOT 1
- Audit and reclassify node catalog HOT 2
- Filled but open shapes don't have click targets for their fill
- [Crash Report] HOT 1
- Contravariance for node inputs with automatic coercion
- Stable document format MVP
- (Question) What is the Cargo package of the desktop client? HOT 3
- (Design suggestion) Replace GTK by a Rust GUI toolkit HOT 5
- BorrowTree inconsistency when closing and opening document
- Crash when selecting node with Widget::NumberInput in properties panel HOT 2
- Cannot set network export to NodeInput::Network
- Visualize data type wire and connector colors based on actual data
- Connector input index skips hidden inputs HOT 1
- Hidden inputs not added to BorrowTree inputs_source_map
- Clicking a selected anchor should deselect all other selected points
- Move node graph interaction logic to backend
- Pen's pressure HOT 1
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 graphite.