Skip to content

Conversation

@are
Copy link
Contributor

@are are commented Jan 29, 2025

This does two things:

  • makes the preview for selected elements only show after the selection is finalized
  • use png instead of svg for preview images

@vercel
Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Jan 30, 2025 0:41am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Jan 30, 2025 0:41am
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Jan 30, 2025 0:41am
1 Skipped Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 0:41am

@github-actions
Copy link

github-actions bot commented Jan 29, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 66.68% (🎯 60%) 68327 / 102468
🟢 Statements 66.68% (🎯 60%) 68327 / 102468
🟢 Functions 63.64% (🎯 63%) 1957 / 3075
🟢 Branches 79.35% (🎯 70%) 8173 / 10299
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/excalidraw/types.ts 100% 100% 100% 100%
packages/excalidraw/components/LibraryMenu.tsx 76.63% 92.3% 100% 76.63% 73-100, 113-123, 173-183, 213-214, 219-223
Generated in workflow #4206 for commit c2a318b by the Vitest Coverage Report Action

@dwelle
Copy link
Member

dwelle commented Jan 29, 2025

Checking, the PNG is in fact indeed perceptibly slower when compared to production. It also has a race condition with font loading (strange) where it sometimes happens that the library item's fonts (e.g. Excalifont) isn't loaded in time of render. And it's less sharp as well :(.

So I'm thinking about skipping the SVG -> PNG part, unless we at least solve the 1) performance 2) fonts issues.

(Also note that using URL.createObjectURL is memory-unsafe if not manually GCed IIRC)

@dwelle
Copy link
Member

dwelle commented Jan 30, 2025

Alright, I removed the PNG renderer for now and we'll see if we can reintroduce it later. Thanks for the PR!

@dwelle dwelle merged commit 61e0bb8 into master Jan 30, 2025
10 checks passed
@dwelle dwelle deleted the are/library-performance branch January 30, 2025 13:41
mtolmacs pushed a commit that referenced this pull request Feb 6, 2025
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
mtolmacs pushed a commit that referenced this pull request Feb 11, 2025
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
mtolmacs pushed a commit that referenced this pull request Feb 20, 2025
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants