Faster captures
This release is mostly about speed. Nothing to configure, you get it by updating.
- Capturing the same element again is about a third faster. On our 250-row table benchmark a repeat capture went from 40 ms to 27 ms. Style-heavy pages and deep trees gained between 18% and 27%.
- Pages that change between captures are 4 to 5 times faster. If you capture, something on the page updates, and you capture again (a dashboard, a live preview, an editor), that second capture used to redo most of the work. On the same table, with a change every fourth capture, the total went from 91 ms to 20 ms.
- Big stylesheets no longer slow down small captures. A small card on a page with a 10,000-rule stylesheet took 22 ms to recapture after any change on the page. It now takes 8 ms.
- Recaptures with
compressare about 3 times faster on image-heavy pages (287 ms down to 99 ms on our 19-image demo). - Pages built from many web components that share the same styles produce a much smaller capture and render faster.
Numbers are from Chromium against 3.7.5. Firefox and Safari benefit from the same changes.
What's next
From here on I'm working on top of this base to simplify the architecture. SnapDOM has become hard to maintain: the caches that make it fast have piled up on top of each other, and that makes it difficult to avoid regressions and to keep moving forward in a sustainable way.
So the next version will come with a lot of changes in that direction. The goal is the same speed and the same fidelity, on code that is simpler to reason about and safer to change.
What's Changed
- fix(clone): paint
accent-color: autostand-ins in the system accent and draw them closer to the native controls by @Hema2-official in #561 - fix(toCanvas): keep literal dollar signs in the Safari shadow rewrites by @jackskip22 in #563
New Contributors
- @Hema2-official made their first contribution in #561
Full Changelog: v3.7.5...v3.7.6