-
Notifications
You must be signed in to change notification settings - Fork 24
multiple threads to compile assets? #308
Comments
Any news so far? I would like this possibility too, since compilation may consume alot of time and this way, we could greatly reduce deployment time. |
Nobody's working on it, @robertwachs. Please do investigate! |
I have a fork that handles multi-threaded manifest.compile() On an 8 core box running with 8 manifest compiler workers we've dropped asset compilation from 7 minutes (1 core intel box) down to 50 seconds. Not too shabby. I haven't had time to cleanup the code and issue a pull request yet but it does work. |
@steel awesome! |
Nice solution! If someone has a solution for this, please leave a note. Thanks Edit Seems like @guilleiguaran took care of that: rails/rails#5409 but its not in 3.2 stable yet. |
Boy its been a long time but finally dropped the monkey patch into a gem: https://rubygems.org/gems/sprockets-derailleur You can now compile your manifest with as many processes as you need and I've included a processor detector as well.
We use this multiple times a day deploying all over the place. Hope this helps other out there. |
@steel awesome! |
When compiling assets, I generally only see one processor being used, which tells me the whole asset compilation process is single-threaded. Is there a reason why it must be that way?
I imagine using threads could significantly improve compiling times.
The text was updated successfully, but these errors were encountered: