Berin Loritsch wrote:
>Is there any way (I am willing to wait for Cocoon2) to make performance
>information available to a stylesheet or XSP so that it can be displayed
>visibly or logged if more than a certain amount of time?
This is probably different than what you had in mind, but it seems like we
could modify the XSP engine to put timing instructions around each "tag"
(ie. the generated code for each tag set), and then include the result times
in the resultant output.
I haven't worked with XSP for a while, so I could be screwed up a bit on my
examples, but hopefully you'll get the idea...
For example, if you had a tag structure something like the following:
stimm@rmci.net
Test
This is a test.
And you specified in the Cocoon configuration/sitemap file that you wanted
XSP timings generated, then when XSP generated the code, it would include
code to check the amount of time it took to process each tagset. The output
would then look something like the following:
...
20
15
18
65
320
The numbers would be expressed in milliseconds.
I could see something like this being rather useful as far as optimizing a
tag library. Using one of the standard profiling tools only provides
profiling information for the *generated* code, but that won't directly help
optimize your tag library to be as efficient as possible. Something like
this, though, could really help you see which tags really needed worked on,
or show you that you need to reconsider the design of your tag library to
help speed things up.
Of course, I could be full of it, too. Other opinions appreciated! :)
- Sean T.