In search.jsp, two approaches are used for speeding up results of an XSLT transform:
(1) Result of sectiondropdown.xsl is stored as an application attribute.
(2) Result of elementdrowpdown.xsl is stored in a directory in eXist.
I think that (2) is a better approach generally, provided that a trigger is set up so that whenever the tree file is modified, the cached section dropdown menu file is deleted. This approach could also be used for the generation of the left-hand-side menu after it is changed to be created using xslt instead of in jsp.
(If we decide that (2) is a better approach, then a trigger is needed so that when the schema file is modified, the cached elementdropdown result in xsl/elementdrowpdown/ is deleted - at present this must be done manually.)
For information on triggers, see http://demo.exist-db.org/exist/triggers.xml?q=.//section\[ft:query(.//title,%20'triggers')]%20or%20.//section[ft:query(.,%20'triggers')]&id=3.3.5#3.3.5