Roger Demetrescu wrote: > Why will TG2 instantiate controllers on each request ? What are the > pros and cons of the actual model of TG 1 (one instance of each > controller in the entire lifetime of the application process) ?
Well, the short answer is because that is how Pylons controllers work and TurboGears 2.0 controllers are Pylons controllers now. The long answer gets into how Pylons is implemented to take advantage of WSGI, and would be a much longer email :) The difference is very minor, as long as you make sure that you aren't doing any sort of expensive initialization at controller instantiation time, and store any global state somewhere other than controller classes. -- Jonathan LaCour http://cleverdevil.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

