WOComponent recursion
Zak Burke <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
I wrote a content management system that displays the files and directories it manages in a giant tree. Originally, the file-manipulation pages were direct actions, so I wrote the tree-displayer as a simple recursive Java method that returned a giant, formatted HTML string. This is not a big site -- there are around 300 files being displayed; the directories are only nested 4 or 5 levels, and most are top-level with a bunch of files and no other children. I just reimplemented the page using a recursively-called WOComponent and performance took a serious hit. The page takes ~40 seconds to load instead of ~3. Template Caching is on. synchronizesVariables... returns false. Is this just WOComponent overhead? I tried to make go stateless too, but I use JSModalWindow which is stateful (why?) and a stateless component cannot have stateful children. PWO Chapter 7 talks about Dynamic Elements, so maybe that's the way to go. If anybody has any hints, send 'em my way. Thanks, zak.