[Zope-CMF] SkinTools optimisation

Johan Carlsson [EasyPublisher] johanc@easypublisher.com
Mon, 14 Apr 2003 18:43:33 +0000


Hi,
I'm not sure if this is an issue for zope-cmf or zope-dev,
correct me if I'm wrong.

I about to implement a SkinnableObjectManager and I as I understand it
the SkinnableObjectManager setus up a self._v_skindata for each object
supporting the SkinnableObjectManager when it is traversed?

This have the implication that if the traverse path of the URL is very long,
e.g. the object is deep in the hierarchy of the ZODB it will use more
time to calculate each _v_skindata.

I would suggest solving this by implementing a lazy _v_skindata that stores
the path, object path and skin name (for instance) and can be use from
the __getattr__ when ever an actually _v_skindata is needed.

Am I missing something how it's implemented?
Is this a good or bad idea?

Best Regards,
Johan Carlsson





-- 
Easy Publisher Developers Team
Johan Carlsson
johanc@easypublisher.com

Mail:
Birkagatan 9
SE-113 36  Stockholm
Sweden

Phone +46-(0)8-31 24 94
Fax +46-(0)8-673 04 44
Mobil +46-(0)70-558 25 24
http://www.easypublisher.com