Skip to content
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

Hanging on processing #201

Closed
mkstvnsn opened this issue May 27, 2014 · 13 comments
Closed

Hanging on processing #201

mkstvnsn opened this issue May 27, 2014 · 13 comments
Labels

Comments

@mkstvnsn
Copy link

Excellent project. I'm having an issue with the optimizer hanging when more data is inputted. Trying to determine the maximum but it appears after either a certain character count or if the program is hitting "something" it fails to deliver a result. Has anyone else experienced this?

It works fine if I drop in chunks of ~250-300 lines of CSS, but after that it does not work for me. Of course the power in this would be making large CSS files smaller... Any advice?

Thank you!

@tadatuta
Copy link
Member

@mkstvnsn can you please attach the file on which CSSO hangs?
we use it with files much larger then 300 lines and it works fine.

@josx
Copy link

josx commented Nov 26, 2014

@tadatuta
I am using it in a 20000 lines css, and it seems to not finnish
you can download it from here

@grrowl
Copy link

grrowl commented Jan 7, 2015

I'm seeing this issue too on a 2600 line fine (one of those, "each selector and rules on one line only" deals).

Since the line it errors on jumps around based on various things (although seemingly always before an #id selector), I'll try breaking it up into smaller files.

@grrowl
Copy link

grrowl commented Jan 7, 2015

The errors were much earlier than the line stated, running through CSSLint shed some light on the issue.

@lahmatiy lahmatiy added the bug label Oct 7, 2015
@lahmatiy lahmatiy changed the title Processing larger file sizes? Hanging on processing Oct 7, 2015
@lahmatiy
Copy link
Member

lahmatiy commented Nov 7, 2015

@josx your file is really huge – it's about 3.7Mb and any tool has trouble with it. Moreover I found 1 (!!) rule that takes 2.1Mb (56% of file) and contains 20873 selectors to set single property background-color. It's very very strange. May be something wrong with css generation?
csso is not hanging in this case, but it takes too many time to done. Probably it's never to be finished.
Anyway we'll use this file example as stress test for future implementations if there are no objections

@josx
Copy link

josx commented Nov 9, 2015

@lahmatiy thanks a lot!
I forgot to write down here, but there was a problem in a less code when generating this file.
Anyways As you said might be usefull to know why it is happening.
Go head and use it!

@lahmatiy
Copy link
Member

lahmatiy commented Dec 8, 2015

@josx Good news: reworked version of compressor (compressor branch, release is coming) is not hanging on your example anymore. It takes about 30sec on my Mac, but outputs the result :)

@josx
Copy link

josx commented Dec 9, 2015

good catch! thanks a lot!
So We can close this issue now.

@lahmatiy
Copy link
Member

lahmatiy commented Dec 9, 2015

I'll do when new release is out.

@lahmatiy
Copy link
Member

lahmatiy commented Dec 9, 2015

Also I see some places for optimisations that could help drop time down. Stay tuned ;)

@lahmatiy
Copy link
Member

csso 1.5 is out, problem fixed.
Compression takes about 12 seconds now.

@josx
Copy link

josx commented Jan 15, 2016

@lahmatiy
Great!
Thanks for your time and effor!

@lahmatiy
Copy link
Member

csso 1.6 is out
Compression takes ~5.5 seconds now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants