Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Jan 27, 2026

move to modern-screenshot for better performance.

this tries to run it in a webworker and then falls back to the main thread.

  html-to-image (basic): 440.70ms
  html-to-image (with fontEmbedCSS): 26.40ms (font embed: 0.20ms, total: 26.60ms)
  modern-screenshot: 54.20ms
  modern-screenshot (worker): 14.00ms (used worker)
  Winner: modern-screenshot (vs basic)

  html-to-image (basic): 458.50ms
  html-to-image (with fontEmbedCSS): 43.40ms (font embed: 0.00ms, total: 43.40ms)
  modern-screenshot: 39.60ms
  modern-screenshot (worker): 19.40ms (used worker)
  Winner: modern-screenshot (vs basic)

  html-to-image (basic): 448.40ms
  html-to-image (with fontEmbedCSS): 36.90ms (font embed: 0.00ms, total: 36.90ms)
  modern-screenshot: 81.20ms
  modern-screenshot (worker): 16.00ms (used worker)
  Winner: modern-screenshot (vs basic)

  html-to-image (basic): 836.80ms
  html-to-image (with fontEmbedCSS): 645.60ms (font embed: 1.20ms, total: 646.80ms)
  modern-screenshot: 1014.00ms
  modern-screenshot (worker): 1226.90ms (used worker)
  Winner: html-to-image (vs basic):

  html-to-image (basic): 925.10ms
  html-to-image (with fontEmbedCSS): 855.50ms (font embed: 1.00ms, total: 856.50ms)
  modern-screenshot: 1097.90ms
  modern-screenshot (worker): 850.90ms (used worker)
  Winner: modern-screenshot (vs basic)

  html-to-image (basic): 2243.40ms
  html-to-image (with fontEmbedCSS): 1085.10ms (font embed: 1.20ms, total: 1086.30ms)
  modern-screenshot: 480.10ms
  modern-screenshot (worker): 110.60ms (used worker)
  Winner: modern-screenshot (vs basic)
@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jan 28, 2026 5:44am

Request Review

@mscolnick mscolnick changed the title ms/move to modern screenshot Jan 27, 2026
Add a progress bad to the PDF export.

When we are snapshotting images, it will increment. Otherwise it will
just show a loading progress bar.
@Light2Dark Light2Dark added the enhancement New feature or request label Jan 28, 2026
@mscolnick mscolnick marked this pull request as draft January 28, 2026 21:52
@mscolnick
Copy link
Contributor Author

modern-screenshot does regress some styling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies enhancement New feature or request

3 participants