On 3/5/07, Henry <[EMAIL PROTECTED]> wrote: > Greetings, > > We're running into some performance issues with an app and I'm hoping to > eliminate Engines as the cause before really taking things apart. Since > we updated the app to Rails v1.2 and upgraded three of the Engines to > plugins that use the 1.2 Engine plugin, we've noticed a noticeable slow > down in both development and staging (using production configuration) > environments.
If you're running without class reloading - i.e. with the production configuration - you shouldn't see the engines plugin hitting the plugins more than once, since once the class is loaded (via require_or_load) it should never be required again. Do you get the slowdown when running in production properly? > The performance issue is manifested in page load times: 1-3 seconds now, > vs. fractions of a second in 1.6. Both development and production logs > show that the DB processing is around 5-10% of the page load and the > rendering about 80-90%. Depending on your queries, this could be normal... it's hard to say. > The app has around 25 plugins total. In the development log I'm noticing > that each page render (or partial render via AJAX) causes the > Engines::RailsExtensions::Dependencies.require_or_load_with_engine_additions > method to fire, checking for controllers and helpers for each plugin. > Is this the expected behavior? If so, is there a quick way to apply the > engines plugin only to the plugins I need it to instead of all 25? Again, require_or_load should *not* be called on each request in production mode. It's normal for the engines code mixing mechanism to check each plugin when loading classes (attempting to load controllers/helpers from your_plugin/app/controller, etc), but this shouldn't happen more than once in production. If, for some reason, Rails is calling require_or_load for each request in production mode, that seems like something wrong with Rails itself... -- * J * ~ _______________________________________________ engine-users mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
