Ticket #2388 (closed enhancement: migrated)
Implement lazy loading of template engine plug-ins
|Reported by:||Chris Arndt||Owned by:||chrisz|
|Severity:||minor||Keywords:||view, buffet, temlate engine, migrate|
Description (last modified by Chris Arndt) (diff)
Currently Buffet template engines are loaded in view.load_engines() when the TurboGears server starts up. This means that all template engine plugins, which are registered through an entry point are loaded and instantiated, whether they are used by the application or not.
We should investigate if it's feasible to instantiate a template plugin only when it is first needed. view.load_engines would then only collect a list of available plugins and set some default engine options. Instantiating the plugin and loading options would then only be triggered from view.render.
This would prevent bad plugins, which are installed but not used in the application, from causing it too fail on startup. Exceptions in the startup phase currently cause TG/CherryPy to hang when the autoreloader is active.
I may also speed up start-up time a bit.
- Owner changed from Chris Arndt to chrisz
- Keywords engine, migrate added; engine removed