On Apr 11, 9:02 am, rogerdpack <[email protected]> wrote: > Here are a few thoughts I had a year or so backy for some potential > low hanging fruit for speeding rails up [if anybody ever wants to > implement them :) > > Forgive the naivety of these, they're mostly just suggestions from > someone not all that familiar with the core code. > > 1) wrap tests in transactions. Since rails now has nested > transactions, it may be possible to speedup unit tests, via something > likehttp://ericholscher.com/blog/2009/jan/15/django-now-has-fast-tests/
Doesn't Rails already do this? > 2) don't write the session out if it hasn't changed at all during a > request. If I remember correctly this was implemented some time after switching to Rack. > 3) don't regenerate query plans every time [cache them if possible]. > > 5) Avoid re-generating sql escaped copies of each column name for > tables. Cache the sql escaped column names. > > 6) LRU cache all sql-escaped data [?] I attempted this 2-3 years ago with my work on prepared statements for ActiveRecord. I did not measure any performance gains. > 4) avoid n^2 filter searches as you handle a request [I believe that's > what it does currently]. At least with the before and after filters, > you could calculate them all once, at the beginning of the request. Hm, I always thought the application of filters is O(n) and not O (n^2). :) Why would it be O(n^2)? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
