[Zope3-dev] zwiki: performance of findChildren()

Stephan Richter stephan.richter@tufts.edu
Mon, 21 Apr 2003 11:39:41 -0400


On Monday 21 April 2003 11:00, Marcus J. Ertl wrote:
> I'm just doing some work on developing a threaded forum for zope3.
> Zwiki was a great place to steal some code ...errr.. a great place of
> inspiration!
>
> The only thing I found was: If I use your system of parenting, e.g.
> findChildren, I get in performance trouble, if I generated up to 25.000
> messages (=wikipages), and tried to build a part of the toc!
>
> Any ideas to speed this up?

Caching or rewriting the parent support.

Rewriting means: Instead of storing the parent in the wiki page itself, you 
could store it as a child in the parent. This way findChildren() will be much 
less expensive. 

However, for a threaded forum I would do it differently and build a true 
object hierarchy (which is not that good for Wikis - which is an exception). 
Basically, make every Message a Folder. Then you simply place messages into 
messages and so on, and you have naturally a tree and all the folder 
functionality.

Since Wikis are general graphs, this method cannot be used for them.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training