-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Introduce worker pools #89
Conversation
I see that builds are failing, because the On 11 September 2023 Node 16 went End of Life. See tweet from NodeJS. So I think we should update the workflows with latest NodeJS versions. |
@ericfennis This pull request is insane. Thanks for making it! Yes, please feel free to change the node versions in the action from: node-version: [10.x, 12.x, 14.x] to node-version: [16.x, 18.x, 20.x] here: svg-fixer/.github/workflows/ci.test.yml Line 17 in 23d4ff8
and the add engine requirements to the "engines" : {
"node" : ">=16.0.0"
} and then finally please create a
I think we should stick to 16.x for a bit longer since I know alot of projects still using it and it supports |
@Ghustavh97 Thanks for your comment. |
@Ghustavh97 Hmm I updated the matrix in the workflows. But I think I need your help with that. |
@ericfennis ok, looking into it. |
Fix #89 MacOS Test Timing Out
@ericfennis I fixed the issue in #90, thanks again for this PR, would never had the time to do it myself. You should now be able to fix your svgs faster in |
@Ghustavh97 Awesome thanks so much! |
Thanks for your work on SVGFixer, great tool!
We switched to SVGFixer at lucide-icons/lucide to build our icon font.
We outline/fix more than 1200 icons to make sure our font will build correctly. Only thing we noticed is that our build times are getting out of hand. It can sometimes go up to 7 min (in Github Actions).
So I am trying to see if we can improve the build speed.
I noticed that currently, the SVGFixer is working single-threaded. And that's maybe why it takes a bit of time when outlining a lot of icons. I was thinking maybe we could switch to multi-threading to speed things up. I experimented with Piscina to create a worker pool to trace the SVG files. And the results were stunning.
Results
Tested on Macbook M2 Pro Max.
Test with Single Threaded (current SVGFixer)
Duration:
2:24.109
(m:ss.mmm)Test with Multi Threading (current SVGFixer)
Duration: 17.158s
Screenshot:
Curious what you think of this change!