Does the asset pipeline (RoR 3.1) waste cycles?

With the Ruby on Rails asset pipeline in RoR 3.1, it’s unclear if the
.coffee and the //= require files get processed only once or with each
asset
request.

For example, I have a file that looks like this:

//= require source/main.js.coffee
//= require source/second.js.coffee
//= require source/third.js.coffee

Ideally, the server would compile these to js ONCE, then bundle them,
then
create a static file. Otherwise it’s going to be wasting cycles
repeating
effort.

Can someone clarify what happens?

Thanks,
Jeff


Jeff Pickhardt
(650) 530-0036
[email protected]

In a development environment it recompiles the assets on every
request. When in production it does it once and adds a hash to the
filename for caching.

Dieter L.
http://ubiety.ca

Jeff Pickhardt wrote in post #1008905:

With the Ruby on Rails asset pipeline in RoR 3.1, it’s unclear if the
.coffee and the //= require files get processed only once or with each
asset
request.

Ideally, the server would compile these to js ONCE, then bundle them,
then
create a static file. Otherwise it’s going to be wasting cycles
repeating
effort.

You know, I find questions like this to be almost insulting to the Rails
core team. Do you really think that the guys designing Rails didn’t
think about such a basic issue of performance and scaleability?
Especially with all the negative press that Rails has had to endure in
the past related to scaleability.

Have a little more trust in the team, or at least do some basic research
before posting FUD like this.