Thanks for the suggestions. I actually set up the turbo-sprockets-rails3 gem and buildpack and the difference is night and day. The first build after switching took only 4 minutes which is way better than the 15+ it was taking before. Consequent builds are taking 30 seconds. Amazing.
On Friday, June 28, 2013 1:32:32 PM UTC-4, Matt Jones wrote:
On Thursday, 27 June 2013 09:11:44 UTC-7, Bryan Migliorisi wrote:Our application is a very large (read: "enterprise") Single Page Application.
Even though our app is 99% client side with a Java RESTful API, we built the web application on top of rails because the Asset Pipeline seemed like a a great fit for us. And until recently, it was.
Our application has several hundred CoffeeScript and SASS files in it (as we've broken our code down in to many smaller pieces for reusability).
We deploy to Heroku, who automatically compiles assets for us. It used to be pretty fast. Then it was a minute. Then 2. Then 5. Now, we have apparently hit the upper limit that Heroku is willing to wait for assets to compile (15 mins).
Pre-compiling the assets on a developers machine is possible but its error prone and doesnt solve the problem of our compilation process taking forever.
I notice that even some of our smaller CoffeeScript files (~50 lines) take 250ms to compile. This quickly adds up with the amount of files we have.
On my i7 MBA, assets:precompile:primary takes around 5 minutes and assets:precompile over 10 minutes. I think (but not sure) the biggest problem is that it appears that a new nodejs process is started for every CoffeeScript file and each start takes a bit of time before the file is even processed.
We are on the latest Rails 3.2.x. Is there a better way? Is there any tuning I can do for improving the speed of compilation?
This might help, if you're deploying to Heroku mostly with assets unchanged:
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/01d7247e-f6b2-49fc-8a13-3395ac48a44c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment