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

Generate sprite on every save #9

Closed
ValentinCreative opened this issue Apr 14, 2013 · 12 comments
Closed

Generate sprite on every save #9

ValentinCreative opened this issue Apr 14, 2013 · 12 comments

Comments

@ValentinCreative
Copy link

Hi Adam,

First, thanks for your very usefull mixin.

I have the same issue than issues #5 & #8.

But the difference is that I don't use CodeKit (only command line) and I use the "compass watch" command.

Every single time I save any .scss, it generate the sprites, even if I don't change any icon.

Thanks :)

@AdamBrodzinski
Copy link
Owner

Hmmm, that's really weird... this seems to be a recurring theme. What happens if you try and run the sample project folder, does that do it as well?

@ValentinCreative
Copy link
Author

I haven't try the sample project, but I have other projects where I use your mixin and sprites does not generate on every save.
I think that come from my project but I can't identify the problem.

@ValentinCreative
Copy link
Author

You think it's related?
I've fixed this problem of retina sprite position.

I'm not on the problematic project actually, when i'll go back on it, i'll try to find exactly what's happen.

I'll let you know.

Thanks again for your useful mixin

@noslouch
Copy link

You know what? I just noticed in a log from CodeKit that the sprite sheet IS regenerated on every compile. In fact, it is regenerating the same sprite sheet one time for each icon in each directory. I caught these four lines in my CodeKit log on an unrelated error:

remove Library/WebServer/Documents/introductions/img/icons-s6adbdf93b9.png
create Library/WebServer/Documents/introductions/img/icons-s6adbdf93b9.png
remove Library/WebServer/Documents/introductions/img/icons2x-s006a9d2f3b.png
create Library/WebServer/Documents/introductions/img/icons2x-s006a9d2f3b.png

It was those same four lines over and over. The file names didn't change. I have 37 icons each in icons/ and icons2x/. The total number of lines was 148, which is a removal and create line for each icon in both folders.

I didn't notice this earlier, because the sprite sheet name ends up being the same, so it's not like there are a bunch of different sprite sheets in my project, it's just the compiler overwriting the same sprite sheet one time for each icon in the sheet.

This would definitely explain the very long compile times I've been experiencing... Maybe this is a useful clue to debugging this particular issue?

@AdamBrodzinski
Copy link
Owner

Interesting! I'll have to checkout this later on next week. It could definitely stand to get some optimizations!

@ValentinCreative
Copy link
Author

This issue occurs in particular conditions … but what conditions exactly ?
I'm on a new project now, and the issue didn't appear.

I'll try next week to find what in my projects causes this issue or not.

I let you know.

@noslouch
Copy link

noslouch commented May 6, 2013

Any progress here?

@AdamBrodzinski
Copy link
Owner

@noslouch Not yet, i'm going to create a project tomorrow afternoon and run it though CodeKit, LiveReload, and the CLI to see if I can suss out the problem. I'll keep you posted!

@noslouch
Copy link

noslouch commented May 6, 2013

Thanks @AdamBrodzinski !

@Victa
Copy link

Victa commented Jun 24, 2013

@ValentinCreative Did you check your compass configuration? Maybe you are using {force:true;}

@MathRivest
Copy link

I have the same issue! Great mixin btw.

It happens for each @include retina-sprite(); used

@AdamBrodzinski
Copy link
Owner

@MathRivest , you may want to try out NovaScreen's fork to see if it fixes this:
https://github.com/novascreen/Retina-mixins-for-Compass

This will hopefully be merged into this repo soon, under a 2.0 release (with breaking api changes). It looks like it should fix the huge slowdown that retina-sprites currently has.

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

No branches or pull requests

5 participants