-
Notifications
You must be signed in to change notification settings - Fork 489
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
More intelligent asset precompilation #394
Comments
I have the same issue: Seems like mina does assets compilation from tmp folder where there is no previous assets, that's why sharing public/assets directory does not work. |
Ah, now I see that this issue actually is encapsulated by #380. So I guess the maintainers are aware of this issue. Maintainers: feel free to close this, or leave open as you like. If I have time I'll start digging into the code a bit to see what might make it work. |
Thanks. Nice catch! |
This is fixed in 1.0.0 release. We added tmp/cache to linked dirs so each new precompilation will only precompile the needed files |
Our app takes about 200 seconds to deploy when we compile assets, and about 25 seconds when we don't. This means it's very painful to deploy asset changes, and we're always trying to avoid it.
I don't understand sprockets very well, but in another rails app I work with when i run rake assets:precompile manually on the production server, it only compiles the files that changed. I really, really wish there was a way to do this with mina
I've tried various hacks to make this happen, like sharing the assets directory between releases. But it seems to be tripped up by a mina assumption that I'm totally blowing away my assets directory every time I run assets precompile.
I'm not sure about a few things:
Thanks for any tips. It blows my mind that no one else on the internet seems to be asking about this, so it makes me wonder if I'm missing something obvious.
EDIT: I only just now realized I should provide a very important fact: our app uses sprockets 2.12.4 and sprockets-rails 2.3.3. This may be relevant?
EDIT 2: I tested updating to Sprockets 3. Asset precompilation is much faster (30s - essentially enough to resolve my problem). But as far as I can tell it's still compiling every single asset every time, rather than intelligently compiling only the changed ones. I'd be interested in hearing the expertise of people on this repo.
The text was updated successfully, but these errors were encountered: