Skip to content

feat: integrate SVGO optimization for SVG output - #76

Closed
zhyd1997 wants to merge 2 commits into
tscircuit:mainfrom
zhyd1997:devin/1759057746-svgo-optimization
Closed

feat: integrate SVGO optimization for SVG output#76
zhyd1997 wants to merge 2 commits into
tscircuit:mainfrom
zhyd1997:devin/1759057746-svgo-optimization

Conversation

@zhyd1997

Copy link
Copy Markdown

Close #56
/claim #56

Performance Impact:

  • Major snapshot files (obj1.snap.svg, repro3.snap.svg) significantly reduced in size

- Add SVGO import and optimize function call in render-svg.ts
- Use default SVGO settings for safe optimization
- Update test assertions to check for 'path' instead of 'polygon' elements
- Update all snapshots to reflect optimized SVG structure
- Maintain all existing functionality while reducing SVG file size
- All 23 tests passing with optimized output
@vercel

vercel Bot commented Sep 28, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
simple-3d-svg Ready Ready Preview Comment Sep 28, 2025 0:03am

@t431w t431w left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t431w t431w left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still taking the time in rendering

@seveibar seveibar closed this Sep 28, 2025
@seveibar seveibar reopened this Sep 28, 2025
@zhyd1997

zhyd1997 commented Sep 29, 2025

Copy link
Copy Markdown
Author

@baeoc @seveibar

It takes too long because of the CDN:

const objUrl =
"https://modelcdn.tscircuit.com/easyeda_models/download?uuid=6ef04b62f1e945518af209609f65fa6f&pn=C110153&cachebust_origin="

I don't know what's happened in it.

CleanShot 2025-09-29 at 12 55 56@2x

@zhyd1997

Copy link
Copy Markdown
Author

Maybe this enhancement is faster: #77

@rronitCodes rronitCodes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue has been closed

@zhyd1997 zhyd1997 closed this Sep 30, 2025
@zhyd1997
zhyd1997 deleted the devin/1759057746-svgo-optimization branch September 30, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve performance by at least 3x, reduce size of SVGs

4 participants