speeding up dtml-tree
hello folks i'm using the dtml-tree tag and generating it's contents via external methods. Unfortunately child lookups are quite slow, as well as the icon choosing machinery; is there any way to cache the tree node objects that my external method creates? thanks for any help. -- Clinton Roy
A real crude way to hack the dtml-tree tag is to make it always assume there are child nodes. This prevents the look up and is a lot faster. Think of Windows Explorer style tag. -- Andy McKay, Developer, ActiveState http://www.ActiveState.com Programming for the People ----- Original Message ----- From: "Clinton Roy" <croy@dstc.edu.au> To: <zope@zope.org> Sent: Monday, August 14, 2000 9:06 PM Subject: [Zope] speeding up dtml-tree
hello folks
i'm using the dtml-tree tag and generating it's contents via external methods. Unfortunately child lookups are quite slow, as well as the icon choosing machinery; is there any way to cache the tree node objects that my external method creates?
thanks for any help. -- Clinton Roy
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
"Andy McKay" <AndyM@activestate.com> writes:
A real crude way to hack the dtml-tree tag is to make it always assume there are child nodes. This prevents the look up and is a lot faster. Think of Windows Explorer style tag. Not really something I want to do, and in my case wouldn't really help anyway, as the icon chosen quite often depends on children values.
Dieter Maurer <dieter@handshake.de> writes:
You could implement your own cache in your external methods.
All I ended up doing was pickling the data structures that I created and doing some simple caching. It works beautifully. Not that Zope helped me at all. I couldn't import modules from the Extensions directory, so I ended up having to put things in $ZOPE/lib/python. For testing I had to have things in the Extensions directory; two copies of things flying around isn't nice. When unpickling under Zope, python couldn't find the class I was referring to, so I ended up just caching the initargs. While none of the above hoop jumping was hard, it was a pain. I certainly hope extensions are supported better in 2.2, in particular: * being able to import modules from the extensions directory * not having naming problems when using extensions under zope I'm about >< close to ditching a Zope talk I was preparing to give to my local Unix users group, but I'm going to see if 2.2 has improved. I'm losing faith people.. -- Clinton Roy
participants (2)
-
Andy McKay -
Clinton Roy