DEV Community

Juan Martin
Juan Martin

Posted on

πŸ“Š SnapDOM - Performance Benchmarks For clientside screenshots

Snapdom has made major performance leaps since v1.8.0.

Simple elements (ms, lower is better)

Scenario Snapdom (current) Snapdom v1.8.0 html2canvas modern-screenshot
Small (200Γ—100) 0.4 1.2 70.3 11.9
Modal (400Γ—300) 0.4 1.1 68.8 14.1
Page View 0.4 1.0 100.5 34.2
Large Scroll 0.4 1.0 153.1 77.8
Very Large 0.4 1.0 278.9 194.7

Complex elements (ms)

Scenario Snapdom (current) Snapdom v1.8.0 html2canvas modern-screenshot
Small (200Γ—100) 1.1 3.2 72.5 16.1
Modal (400Γ—300) 4.5 14.0 90.1 34.6
Page View 32.9 113.6 196.1 181.1
Large Scroll 133.9 387.4 446.6 635.9
Very Large 364.0 1200.4 1275.4 1685.6

⚑ Summary

  • Snapdom (current) is 2–4Γ— faster than v1.8.0
  • Up to 500Γ— faster than html2canvas
  • Much faster than modern-screenshot, especially with large/complex DOMs

πŸ§ͺ Benchmarks run with Chromium + Vitest on a 2018 MacBook Air

🏎️ Even better performance on modern hardware!

https://github.com/zumerlab/snapdom/discussions/102

Top comments (0)