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:
- Does this behaviour exist with vanilla rails? If I compile 100 images and one javascript file, change the javascript file, and compile again, will rake only modify the javascript file?
- Is it possible to get this behaviour to work with mina, for faster deploys?
- If not currently possible, would a pull request to add this possibility be welcome?
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.
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.