New Discussion

Notifications

You’re not receiving notifications from this thread.

development env: is the asset pipeline expected to compile all assets or just those in demand?

2
Rails

I'm trying to understand if, in development, the asset pipeline is supposed to compile ALL assets found in manifest.js or just the ones that are requested.

I've been doing some testing and have found that it appears all assets are compiled even when only a singular small asset is requested. This for us can be extremely slow.

It would seem to me that all assets are compiled even if a singular, small, asset is requested. This, for us, is very slow.

It might be that your configuration is causing the pipeline to compile all assets instead of just the requested ones. You could try using require instead of require_tree to specify exactly which assets are needed. Also, make sure there are no settings forcing the compilation of all assets even when it's not necessary.

Yes, in development Rails compiles everything listed in manifest.js, which can feel slow — it’s by design for debugging, but you can tweak configs or split manifests to speed things up.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 92,170+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.