Slow when HTML + CSS is large
See original GitHub issueWhen I run:
▶ time node bin/minimalcss.js https://www.peterbe.com/plog-original.html -o /dev/null
It steadily takes about 6-7 seconds. That’s way too slow. Let’s see what we can do.
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (15 by maintainers)
Top Results From Across the Web
Fixing a slow site iteratively - CSS-Tricks
It shows that the slow site's content is 59.9% compressed. That probably means there are more opportunities to make things even smaller. I ......
Read more >Does bloated HTML and poor CSS slow down your site? If so ...
Yes, bloated HTML and CSS can slow down your site. But so can deeply nested containers, frameworks, large libraries, large images, slow CDNs...
Read more >Is a larger css file slowing down Dom processing?
1 Answer 1 · Don't use @import · Always use Backup Fonts · Segregate large CSS files out into multiple Smaller ones ·...
Read more >How To Optimize CSS for Peak Site Performance - Kinsta
Large CSS Files Take Time to Process The larger your stylesheet, the longer it takes to download and process into a CSS Object...
Read more >Optimizing CSS for faster page loads - Tomas Pustelnik
How does CSS affect load times · CSS file size and the total amount of CSS on the page (number of files). Too...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
what would be the value-add of
--use-dropcss
over the DropCSS/Puppeteer demo i posted above and the same advice in its docs? if you’d like to add this option to minimalcss, then certainly feel free to do so.i’m not sure i got this one 😃 did you want me to compare the diff between dropcss and minimalcss outputs of your site?
What I’m saying is that
minimalcss
current bundles two distinct pieces of functionality. A) getting the HTML B) analyzing the HTML. It’s kinda nuts that it’s all baked into 1 thing but here we are. I like all the work and effort that’s gone into (A) but I wish (B) was something you can optionally swap in and out for other solutions.In other words, today
minimalcss
is puppeteer + csstree+cheerio. What--use-dropcss
would do is change that to puppeteer + dropcss.I do. But struggling to find the time. It’s easier to think and comment about it rather than writing a patch. It was my optimistic hope that you’d have the inclination but I totally understand if you don’t.