Closed francois2metz closed 9 years ago
If you're running Teaspoon >= 0.9, you can use the expand_assets
suite configuration to speed things up. The downside is it makes code harder to debug as the stack traces all point to one monolithic file.
https://github.com/modeset/teaspoon/wiki/Teaspoon-Configuration#suite-configuration-directives
Why not speed up thinks for users that don't want to use expand_assets
? Any reasons to append body=1
by default? Sprockets will do for you later.
Because Teaspoon runs in the development
Rails environment, and we want to provide a consistent experience regardless of whether the host app's config.assets.debug
is set to true
or false
.
Appending ?body=1 to all assets make javascript_include_tag very slow.
So only append it to instrumented file and let sprockets to his job for others files.
In our app, performance improvements with this patch are quite impressive (527 JavaScript files so far)
I instrumented _boot.html.erb:
Without the patch:
12.500000 0.500000 13.000000 ( 13.000034)
With the patch:3.140000 0.120000 3.260000 ( 3.256158)