jwhitley / requirejs-rails

RequireJS support for your Rails 3 or 4 application
MIT License
592 stars 202 forks source link

Precompiling process is considered slow #245

Open chenxeed opened 9 years ago

chenxeed commented 9 years ago

Hi,

I used to precompile a lot and I realize that everytime i'm doing precompiling, on my site it takes around 5 minutes long to finish precompile, while before using requireJS it's only taking me less than 1mins.

I suspect the reason is that because on precompiling, it keeps regenerating all files even if it's not changed. Please correct me if I'm wrong about this.

Will be happy to discuss if there's any tweak I can do to reduce the precompile process. Thank you

siassaj commented 8 years ago

We're experiencing extremely slow asset precompilation also, with node reaching 99-100% cpu for the entire time, even if no js files were touched.

I'm pouring over the source now, but it's making requirejs rails next to unusable on the smaller ec2 instances that use cpu credits...

Anyone else getting this?

a2f0 commented 8 years ago

+1

tilsammans commented 7 years ago

@siassaj did you ever find out what was causing it? I am seeing the same thing.

carsomyr commented 7 years ago

@tilsammans Have you tried calling Node directly, using the generated tmp/requirejs/rjs_driver.js file?

tilsammans commented 7 years ago

Ah, not yet. Will check that out!

siassaj commented 7 years ago

@tilsammans sorry, never got to the bottom of it. I switched out to webpack and it was the right thing to do.

kevinluo201 commented 3 years ago

I think you can avoid to include "node_modules" in assetes.rb