1

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.

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 while some take 30 seconds or more on my i7 MBA. This quickly adds up.

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?

4

0 回答 0