question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Performance] Strange super slow speed on certain files.

See original GitHub issue

Thanks for this awesome project! This really help CDNJS minify the css assets easily!

I just found that clean-css will be super super slow when compressing some files, especially the css files in Google’s material-design-icons project, it’ll spend more then 10 minutes on a single css file which looks abnormal.

This is my environments: node versions : v4.5.0 / 6.3.1 / 6.5.0 and some others … clean-css versions : v3.4.10 / 3.4.19 and some others … platform : Ubuntu 14.04.5 (also tried on Arch Linux)

There are some of the files with performance issue: https://github.com/google/material-design-icons/blob/3.0.1/sprites/css-sprite/sprite-av-black.css https://github.com/google/material-design-icons/blob/3.0.1/sprites/css-sprite/sprite-action-black.css

The size of those files are not so huge:

-rw-r--r-- 1 peter peter 108503 Sep  2 08:32 sprite-av-black.css
-rw-r--r-- 1 peter peter 185707 Sep  2 08:32 sprite-action-white.css

The lines of codes in that two css files:

5197 sprite-av-black.css
8904 sprite-action-black.css

The parameters I’m using: --compatibility --s0

But remove all the parameters didn’t help at all.

Do you guys have any idea about that? Many thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
jakubpawlowiczcommented, Sep 9, 2016

Great. Thanks for bringing this performance regression into my attention.

1reaction
jakubpawlowiczcommented, Sep 4, 2016

Hi @PeterDaveHello, glad clean-css works well for you!

I’ve just tested both files and that slow down is related to the most time consuming advanced optimizations: restructuring. In case of those files it tries to reorganize the whole CSS file, see examples here: https://github.com/jakubpawlowicz/clean-css/blob/master/test/selectors/restructure-test.js

I recommend you turn it off using --skip-restructuring in case of those files. There’s a ticket to refactor said optimization as it’s currently way too complex: #533.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Diagnosing a Very Slow Download Speed - The Plug
There are lots of reasons why your download speed is so slow. Here's how to speed up your download speeds, so you won't...
Read more >
Download Speed Suddenly Slow (Causes, Fixes)
If your download speed suddenly slow there could be many reasons. We give you everything you need to know and how to fix....
Read more >
Internet slows slows down when downloading large files ...
Most likely your ISP is throttling large downloads. Many of them do this. They give you a high speed for the first 10...
Read more >
Having Slow Internet on Windows 10? Here's What to Do
Head to Network and Sharing Center. You can achieve this by right-clicking the network symbol located on right side of your taskbar. Some...
Read more >
Windows 10 Download Speed is very slow
Re: Windows 10 Download Speed is very slow​​ Nothing much problem, WiFi and network are going good . It may be problem in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found