Right tools …

9 08 2007

You know you did a great job in the last 10 minutes when you go from:

Total time: 15.5901584625244Average time: 3.11803169250488

to

Total time: 3.72735238075256Average time: 0.745470476150513

This performances improvement main reason ? Simple: last version of ruby-prof eases Ruby On Rails application profiling to the extreme … simplifying the work of your truly ;)

Add to this a good example from the ruby-prof’s author and you get a neat performances improvement by only modifying 2 or 3 lines of code. The funniest part is that the root of the previously bad performances is the exact same as the one described in the article: massive usage of ActiveRecord#attributes in an object method called for every access to the objects’s fields:

%self     total     self     wait    child    calls  name
55.20     28.28    27.35     0.00     0.93    82447  Kernel#clone

Another example, that with the use of the right tools ….


Actions

Informations

Erreur de la base de données de WordPress : [Table 'sl33p3r.wp_comments' doesn't exist]
SELECT * FROM wp_comments WHERE comment_post_ID = '11' AND comment_approved = '1' ORDER BY comment_date

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>