All hail Gaben… ehm optimization!

Before:

Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.534104)
Benchmarking parseQuickLook:
       user     system      total        real
   0.020000   0.000000   0.020000 (  0.610587)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.422812)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.405687)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.396164)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.371604)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.411998)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.010000   0.010000 (  0.387384)
Benchmarking parseQuickLook:
       user     system      total        real
   0.020000   0.000000   0.020000 (  0.673446)
Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000076)
Production cost report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.007484)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.418086)
Benchmarking parseQuickLook:
       user     system      total        real
   0.020000   0.000000   0.020000 (  0.446162)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.392303)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.390188)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.412362)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.427071)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.627583)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.402546)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.434892)
Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000102)
Production cost report: 
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.001292)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.418595)
Benchmarking parseQuickLook:
       user     system      total        real
   0.020000   0.000000   0.020000 (  0.413026)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.010000   0.020000 (  0.400815)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.409537)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.464621)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.410090)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.393017)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.442389)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.412018)
Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000064)
Production cost report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.004622)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.408888)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.010000   0.020000 (  0.417567)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.461256)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.410171)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.405976)
Benchmarking parseQuickLook:
       user     system      total        real
   0.010000   0.000000   0.010000 (  0.396160)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.436136)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.400430)
Benchmarking parseQuickLook:
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.394962)
Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000034)
Production cost report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000094)

After optimization:

Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000046)
Production cost report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.010514)
Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000043)
Production cost report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000584)
Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000030)
Production cost report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000774)
Recommendations report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000064)
Production cost report: 
       user     system      total        real
   0.000000   0.000000   0.000000 (  0.000251)

Hashtag “inlovewithruby” 🙂

From 14.727 seconds to 0.012306 seconds, that’s 1196 times increase.