Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(webfont): improve build performance #1316

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kakkokari-gtyih
Copy link

@kakkokari-gtyih kakkokari-gtyih commented Jan 23, 2025

This pull request improves the usage of external tools such as FontForge and svgo and reduces massive console output.
This will greatly reduce the time required to build webfont. In my environment, this used to take 45 minutes when there's no cache. Afrer the refactoring, build time was reduced to about 15-20 minutes even without cache.

(most of diffs are from pnpm lockfile; actual changes are not that much)

Notable Changes

  • Console outputs are reduced. You can still check them by executing through pnpm build:webfont --debug (--debug arg).
  • The process in FontForge and svgo is now done in batches for each variant, rather than one icon at a time.
    • Python script now accepts the path to the directory where svg is stored, instead of the path to the single svg file.
    • Non-optimized svg are now stored in a temporary directory called icons-outlined/<weight>/<variant>/new and the folder is deleted after all optimization is complete.

Minor Changes

Copy link

vercel bot commented Jan 23, 2025

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

Name Status Preview Updated (UTC)
tabler-icons ✅ Ready (Inspect) Visit Preview Jan 30, 2025 0:45am

@codecalm
Copy link
Member

@kakkokari-gtyih can you resolve conflicts?

@kakkokari-gtyih
Copy link
Author

kakkokari-gtyih commented Jan 30, 2025

@codecalm Conflict resolved!

@kakkokari-gtyih
Copy link
Author

There's no conflicts so far

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.

pnpm-lock.yaml is unsupported by pnpm version specified in package.json
2 participants