#2388: Implement lazy loading of template engine plug-ins
------------------------------------------+---------------------------------
 Reporter:  Chris Arndt                   |        Owner:  Chris Arndt
     Type:  enhancement                   |       Status:  new        
 Priority:  normal                        |    Milestone:  1.5        
Component:  View                          |      Version:  1.1 HEAD   
 Severity:  minor                         |   Resolution:             
 Keywords:  view, buffet, temlate engine  |  
------------------------------------------+---------------------------------
Old description:

> 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 need. `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 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.

New description:

 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.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2388#comment:1>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to