-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Running out of memory with uncss #1087
Comments
Any performance optimizations (including memory usage) must be started from benchmark. So we need the exactly CSS file to reproduce error. Then we need to run it by PostCSS alone and by PostCSS+uncss to understand the source of problem. Of course, any full AST tool had a memory limits. But 7 MB of CSS should be processed in my opinion. /cc @RyanZim |
This description details one way to examine the issue: Also if you try to run the deploy task for the repository that produces this test case you will also see it runs out of memory: Note the CSS file for the above test is 677,000 lines long. git clone https://github.com/superflycss/utilities-icons
cd utilities-icons
npm i
npm run deploy The only difference between |
Thanks. Looks very useful. Now step 2: run it by PostCSS and by PostCSS+uncss. |
If you run Also just FYI this is the build task. And this is the deploy task. Also these are the directories that the build uses |
And we have "out of memory" problems in both cases, yeap? |
Only when running |
So, seems like memory problems are only in uncss 😎 |
True - we just wanted to see if you could give us some pointers on how it might be resolved? |
I am not so good in memory debugging to really help uncss. But can remind common recommendation — disable feature by feature and check does it involve in the problem. On your place I started from any parts, where you create cache/etc for CSS. |
Sounds good - thansk - Looks like the only way is to do a deep dive. |
Hi - Just wanted to see if perhaps anyone had any thoughts on how we could improve computational and memory efficiency when running the uncss plugin. I did a writeup here:
https://stackoverflow.com/questions/46993217/streaming-css-through-postcss-uncss-plugin-in-order-to-minimize-buffer-usage
It's related to these two uncss issues:
The text was updated successfully, but these errors were encountered: