Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Slow Development

#4866

A patch to improve speed in development, add descendents method to ActiveRecord::Base as suggested by Yehuda

Reported by Jan De Poorter · June 15th, 2010 @ 08:06 PM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Stephan Kaag
  2. Wincent Colaiuta
    Wincent Colaiuta

    -1 please don't apply these patches in their current form.

    Patch 1/2 doesn't actually fix the spelling; it removes the correct spelling and inserts the wrong spelling.

    See:

    http://dictionary.reference.com/browse/descendant

    http://dictionary.reference.com/browse/descendent

    "descendent" is an adjective, so could be used to say something like "descendent_classes".

    "descendant" is a noun, which is what we need here.

    June 18th, 2010 @ 03:18 PM

  3. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to open

    Let's switch back to descendant

    June 18th, 2010 @ 11:59 PM

  4. Santiago Pastorino
    Santiago Pastorino
    • Milestone cleared.
    • Assigned user changed from Yehuda Katz (wycats) to José Valim

    As requested by Jeremy, assigned to José.
    Also Wincent is right, so don't change the name, leave as descendants

    June 19th, 2010 @ 12:16 AM

  5. José Valim
    José Valim
    • State changed from open to resolved

    I pushed a bunch of commits to solve this issue. Could you please try it out?

    June 19th, 2010 @ 11:20 PM

  6. Jan De Poorter
    Jan De Poorter

    It still feels a lot slower then on beta4, yet benchmarks show that loading is a lot faster. Are there any good ways in Rails3 to profile a request?

    jan-wired:Openminds/sock (master*)$ r benchmarker 10 'User; ActionDispatch::Callbacks.new(Proc.new {}, false).call({})'
    /Users/jan/.bundle/ruby/1.8/gems/tolk-1.0/lib/tolk/engine.rb:5)
                user     system      total        real
    #1      0.840000   0.090000   0.930000 (  1.259372)
    

    June 19th, 2010 @ 11:36 PM

  7. José Valim
    José Valim
    • State changed from resolved to open

    Jan, I'm almost sure that in the benchmark script above, most of the time is spent in loading the class User. Could you confirm? And the current results are two times slower than beta4, right?

    June 19th, 2010 @ 11:54 PM

  8. Jan De Poorter
    Jan De Poorter

    Forget my last post, laptop was under lot of IO load which made results a bit off. With current master this is the result from the benchmark.

    jan-wired:Openminds/sock (master*)$ r benchmarker 10 'User; ActionDispatch::Callbacks.new(Proc.new {}, false).call({})'
    /Users/jan/.bundle/ruby/1.8/gems/tolk-1.0/lib/tolk/engine.rb:5)
                user     system      total        real
    #1      0.550000   0.020000   0.570000 (  0.585960)
    

    which is the same speed as with beta4, it's also the same speed when running through the app in a browser. Load times per page of 0.5seconds instead of 3 to 4seconds / request.

    Thanks a bunch, for me it is resolved

    June 20th, 2010 @ 12:10 AM

  9. José Valim
    José Valim
    • State changed from open to resolved

    Great!

    June 20th, 2010 @ 12:15 AM

  10. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM