What's new? | Help | Directory | Sign in
Google
bundle-fu
Ruby on Rails plugin - CSS/JS asset bundling in 10 seconds or less!
  
  
  
    
Search
for
Updated Nov 01, 2007 by timcharper
Labels: Featured
Benchmarks  

When Bundle-Fu was released, I made the statement that JS compression yields marginal results. Bundling yields about 6 times more performance than bundling+compression.

I still hold my position that bundling is the biggest speedup you can perform (knocked off 1 2/3 seconds load time in this benchmark). Javascript minimization only yielded an additional 1/7th of a second speedup. However, that's not to say it's a bad idea to compress javascript - every bit helps.

Here are some benchmarks of real world performance increases experienced by employing bundle-fu:

Overview

http://spinstudentlife.com/sightings

Test was performed by clearing the cache before each load. Load times calculated by firebug.

Benchmarks

Unbundled, Uncompressed

Run Site load time
1 5.32
2 5.35
3 5.08
4 4.87
5 5.81
Average 5.29

Bundled, Uncompressed

JS size - 192k

Run JS load time Site load time
1 1.59 3.27
2 2.53 4.30
3 1.99 3.64
4 1.60 3.18
5 2.08 3.67
Average 1.96 3.61

Bundled, Compressed

JS size - 142k

Run JS load time Site load time
1 1.78 3.28
2 2.03 3.63
3 1.35 3.42
4 1.51 3.17
5 1.89 3.81
Average 1.71 3.46

Summary

Overall speed gained by:

bundling 3.61s vs 5.29s 46%
bundling and compressing 3.46s vs 5.29s 53%

Further speed could be obtained by implementing server-side gzip compression of css/js assets.


Comment by tamerhelmysalama, Feb 12, 2008

Using bundle_fu didn't improve performance at my side (apache bench). 100 Request, 10 Concurrent, single mongrel instance, 5 JS + 3 CSS

min mean [+/- sd] median max -
510 5228 894.8 5461 5628 Unbundled
511 5246 902.1 5481 5633 Bundled

Is there something I'm missing?

Comment by timcharper, Feb 13, 2008

bundle-fu optimizes overall loading time, not page rendering speed. Use firebug to measure your speedup.


Sign in to add a comment