Hello- little update on <www.holograph.so> - forme...
# devlog-together
d
Hello- little update on www.holograph.so - formerly known as the propagator simulator- I am working on performance had had the nerdiest proud moment ever and figured of all people, ya'll would appreciate it. I built a propagation speed profiler in holograph to test how fast propagation was occurring for a little recursively incrementing loop (in the grey box). Im using a buffer to collect and average the values over time and another buffer to collect and display averages as a chart. You can see the propagation speed and compare it with the total Propagations Per Second (PPS in the top left). Before this work i was at a hard cap of 60 pps and now total pps often gets over 300. Still a long road ahead but it feels like a big win right now 🎉 In any case, this example demonstrates major stuff added since my first post here: • Get and set shape properties • Trigger click events • Dashed arrows that don't fire propagators • Async functions/fetch/await syntax • Lots of cool examples to explore- including some made my folk here :) Hope ya'll enjoyed the update! If ya'll find anything wonky or have ideas let me know !
❤️ 9
🍰 3
i
Do you know what the current bottleneck is? Like, if you run this without rendering, does it get 100x faster?
d
I wish. Rendering is batched and throttled to requestAnimationFrame and rendering together takes maybe 10% cpu (purple)? The main propagate function is maybe 50% (cyan). Maybe 20% idle (all propagation is async/settimeout rn so min 4ms delay there). Going to have to really optimize the propagate function to really push the limit which shouldn’t be too bad since it’s currently garbage. And reduce unnecessary propagation. And parallelizing/webworkers. And eventually I’ll probs want the main propagation logic in c/wasm. Just gonna be a slog haha
c
Are you still diffing tldraw nodes of each update?
d
Each update is constructing a partial shape object, and if it causes a downstream update, it recurses. Upon user actions, TL is handling diffing and firing a callback with changes which initiates update loop. Does that answer your question?
@Ivan Reese Got a bare-bones (no UI) propagator network running in C at 500k+ propagations per second (it runs primitive ops like add, multiply). So to answer your question: Yes. lol
i
Ahh nice