SnapDOM v3 is comming!!! #481
tinchox5
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Short version: v3 is an engine rework. Most of what you use day to day already shipped in 2.24. What changes underneath is how fast a capture is, and how it behaves when you call it more than once.
Faster first capture
The engine now scans your stylesheets once to learn which CSS properties your page can actually use. Every node then snapshots around 50 properties instead of 400. That read was the biggest cost in any DOM capture.
Repeat captures get much cheaper
v2 had memoization, but you had to turn it on. In v3 it engages on its own: capture the same element a few times and unchanged repeats return instantly. When something does change, only the changed subtrees are rebuilt, and the result is byte identical to a full capture. Nothing to configure.
Web fonts embed by default
In v2 you had to opt in, and if you did not, webfont text quietly rendered with fallback metrics. v3 detects it and embeds only what the capture needs. Pages that use system fonts pay nothing.
Fewer knobs
fastis gone,cacheis now a single debug switch, and per capture state is isolated so concurrent captures cannot interfere with each other.Status
v3 is in beta and not published yet. The current release stays 2.24.x. I will post again when the beta is on npm.
All reactions