Editor speed up!#1
Conversation
AfterAStorm
left a comment
There was a problem hiding this comment.
A few little issues, but a step in the right direction!
This is removing wire profiling, but it currently runs per wire per frame ever frame with or without the profiler open! Removing this led to a noticeable speed up in a lot in my larger schematics.
Scale the canvas with device pixel ratio, avoid clearing the canvas backing store every frame, pause updates while loading. Now culls offscreen nodes/connections using viewport bounds.
dbb957d to
c5cb1f7
Compare
chrome_2026-07-05_13-30-52.mp4edit: the video looks way better than how it actually was-- it's being recorded at a slower framerate & bitrate Weird behavior:
But in theory, the PR should be significantly better, since it's not re-creating canvases nor invalidating* every frame, so I'm not 100% what changed. This is with ~300 nodes and ~300 connections. |
|
Pt.1 FPS Snippet (slopmachine generated): |
|
It seems the canvas patch was already being detected by Chrome, so the canvas change actually has a negative impact one chrome because it did this already... somewhere. I don't think I'll find what exactly in Chrome causes this, but it does have a 3x speed up on Firefox and I assume all other non-chromium based browsers. |
|
Fixed! (I hope). After doing more benchmarking I can say zoomed performance now gets faster as you zoom out, due to 34d7165 (Tests done on chrome) Post-PR Before Patch [28 fps]: |
|
For completeness and history, I'll copy my discord message here: After a quick fetch and... compile?... it's still not remedied for me: the current deployment is faster...? it's the average case of "it works on my machine" :( Updates should have minimal impact since... well... they aren't doing very much. I'm not sure if it's my version of chrome, it giving https/domains a higher computational priority, or some other magical canvas issue It almost feels like there's a memory leak as the performance just slowly deteriorates, but there shouldn't be! part 2: |





This adds a few things to improve the quality and performance of the renderer:
If I need to make any edits to this PR I am more than willing.