Tailwind CLI performance? #2839
-
Hi, i have a very small setup with daisy UI, tailwind CLI and a small css file with around 100 custom lines. Whenever I make changes to this file the tailwind CLI takes around 5 to 15sec to recompile. Very annoying. And even worse, I get a lot of OOM errors and crashes during the day. Have you made a similar experience? I am not sure if this is due to the additional complexity of daisy UI, I cannot find similar issues in the tailwind repo. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Navigating this matter involves considering various factors, with the chief culprit often being the speed of your computing system. Remarkably, on Apple M1, this predicament is nearly unheard of, as it effortlessly compiles the CSS file within a matter of seconds. To delve deeper into troubleshooting, it would be beneficial to provide details about your system, enabling a more thorough investigation of the issue at hand. |
Beta Was this translation helpful? Give feedback.
Yeah, I have tried that, but it makes almost no difference.
But I have solved the problem. I have figured out that I can easily measure the performance with the --inspect argument.
So this is my result:
Using this tool I can also debug the CLI and I realized that the CLI was scanning files that I have not seen before. So I found a forgotten node_modules folder that was there because the project has been restructured a while ago and it was scanning all these files. The folder was hidden by the IDE. Stupid me. Now it runs in 60ms. Not super impressive, but more than enough :)
Here is the profile, in case you are interested in my stupidity :D
CPU-20240210T234618.cpuprofile
Lets see if my me…