> Also, the eager loading seems pretty detrimental any time Rails is > booted from the console, such as via `script/runner` or `rake > db:migrate`. Not only can it blow up because of an unmigrated > database, but it incurs a pretty senseless performance hit for what > may be a simple task. This could really hit applications that use BJ > to run jobs in a full Rails environment, for example. > > Does anyone have ideas how Rails might be smarter about when to eager > load?
This is something that's being worked on in edge rails at present. The goal is to move that preloading code to be as 'lazy' as it can be. The code still needs to fire in order to allow thread safe dispatching, but there's definitely no reason to do it for rake tasks, script/runner etc. Josh and jeremy have been hacking away on it, perhaps they have something to add? > -Lance > > [1] http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/802 > > > -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
