On May 25, 11:40 am, "Diez B. Roggisch" <[email protected]> wrote: > > I'm not sure why all of PIL, genshi, mako, tempita, pygments (!), the > > whole paste and tw.core subhierarchies, among others, have to be > > loaded like that. > > And the gain of lazyfying that so that it happens when the first request hits > the system would be what?
It's not about lazyfying, it's about loading only what's needed. There's no reason to load three different template engines, the PIL library, the pygments package, and whatever else, if your application / never/ makes use of them. (as for pygments, perhaps it's needed in debug mode for the nice traceback display? regardless, it shouldn't be loaded unconditionally) > I still don't see the issue - do you actually have *problems* serving a TG app > with reasonable speed and scalability? Not concretely (the app I'm working on has a couple of requests per minute only). But I know that if I had a performance-critical app, I'd be very suspicious about TG's memory requirements. Loading lots of modules has a real cost. Besides inflating memory requirements (and potentially decreasing CPU caches/TLBs efficiency), it also, as I showed, has a dramatic impact on the cost of garbage collection. (Python 2.7 will mitigate the latter a bit, but not make it disappear) Regards Antoine. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

