Hi again,
This is just a follow-up to my previous message (see below). I looked a bit more into this and I think I might have found the reason for the slowdown. If I understand it right AJAX is used to limit the data that is being sent between server and browser, sending only the data that actually has changed. This is happening on a per-widget basis, i.e. only the data of the widgets that have changed get sent. Now here (I think) is the problem. If I expand a node in the tree widget the whole tree widget is marked to indicate the change. So, if the tree already has lots of expanded nodes (hundreds) and I expand another node, the whole tree data is being sent (and not only the data of the node that has been clicked), which obviously will take more and more time the bigger the tree grows. Running the cocoon profiler also seemed to confirm this. My question now is, can anyone confirm my findings and if so, does anyone know how I could fix this problem, i.e. is there a way that only the node data gets sent instead of the whole tree data? Thanks again for your time. _____ From: Filip Pavlin Sent: Friday, 16 November 2007 12:10 PM To: '[email protected]' Subject: Tree widget - slow when heavily populated? Hi, I just recently added the cocoon tree widget to our application (which I’m populating dynamically with data from a database) and everything is working fine (I’m using cocoon-2.1.9, jdk1.6, tomcat-5.5.17 on Win XP). However, I noticed that the opening of a node takes significantly longer (even if there’s only one child-node underneath) if there are lots of nodes already displayed (with ‘lots of node’ I mean many hundreds or even more). The opening of the same node takes much less time if I minimize the number of open nodes. To illustrate this: | |---| | |--- | … (hundreds of open nodes) | |--- | |---| <-- opening node with only one child takes about 10s | | \ | |---| <-- opening same node as above (with only one child) takes about 1s | Has anyone observed this kind of behaviour? Is that an expected behaviour? Apart from the tree population (which as I mentioned is happening dynamically) everything else is implemented pretty much in the same way as the tree samples provided with cocoon-2.1.9. Thanks for your time. Filip Internal Virus Database is out-of-date. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.19 - Release Date: 2/11/2007 12:00 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.1/1140 - Release Date: 19/11/2007 7:05 PM
