I wrote my initial response at like 12am, so sorry it was so terse.  I
wanted to thank Mark for bringing this issue up to the ML, and I will
try to do that more successfully in the future.  I realize that the
change I made effects the entire TG dispatch, and that really needs to
be discussed.  This change is really forward-looking.  I am hoping
that there will be a miriad of tools for TG that can be plugged into
an existing application, and I expect these tools to use TW.  TW is
such a powerful technology, and I would hope that making it as easy as
possible to use would be beneficial.  I hope this explains my POV a
little better.

Oh, and if I get to vote: +1 :-)

cheers.
-chris

On Jan 15, 1:50 am, Michael Brickenstein <brickenst...@mfo.de> wrote:
> Hi Chris!
>
> It easy to suggest something (without having the time to help).
> But I think, this is related to some crucial design problem (at least
> in the old version dbsprockets).
>
> You remember all the problems, we had with having a version of
> dbmechanic for Pylons/TG1/TG2 and to fix bugs in all of them...
> Essentially, I think Catwalk2 should be its own WSGI app.
> It shouldn't need to be it's own framework like RUM, but maybe just be
> a TG2 app, mountable in other TG2 apps.
> I think, that should solve the problem (and would be a good test, if
> TG2 is designed cleanly enough to support that).
>
> Michael
>
> On 15 Jan., 07:48, percious <ch...@percious.com> wrote:
>
> > Just so you guys know, this change allows people with mako, jinja, or
> > chameleon.genshi default_templates to use "tg components" like
> > tgext.admin and Catwalk.  Without this, those libraries have to use XML
> > () all over the place in their templates which also degrades
> > performance.  The default template already loads TW by default, so I
> > am uncertain why having TW as a dep. would be a concern.
>
> > cheers.
> > -chris
>
> > On Jan 14, 9:34 pm, Chris Miles <miles.ch...@gmail.com> wrote:
>
> > > On 15/01/2009, at 4:07 AM, Mark Ramm wrote:
>
> > > > if tg.config.use_toscawidgets:
> > > >    import tw
> > > >    tw.framework.default_view = tg.config.tw.framework.default_view
>
> > > > Makes sense, though you only want to do the import once, not on each  
> > > > request. ;)
>
> > > I was going to suggest that there should be no performance penalty  
> > > when repeating an import as Python only imports a module once.  But  
> > > even though that is true, it looks like there is still the overhead of  
> > > processing the import statement and checking whether the import is  
> > > necessary, assigning the reference, etc.  See
> > >  http://wiki.python.org/moin/PythonSpeed/PerformanceTips#ImportStateme...
>
> > > They suggest the use of a global for doing efficient lazy imports.
>
> > > Cheers,
> > > Chris Miles
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to 
turbogears-trunk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to