jGD performance (again)

6 views
Skip to first unread message

Broofa

unread,
Feb 11, 2008, 12:49:22 PM2/11/08
to jgrousedoc
Hey Denis,

I'm not sure there's anything to be done about this, but XSLT
performance is rearing it's ugly head again. The latest run for of
jgd on our codebase took ~12.5 minutes to finish. I've provided
metrics for our code below to give a feel for just how much "stuff" is
being processed. And just for grins, I ran the same code through
JSDoc Toolkit, which took 1.8 minutes (Of course, it didn't actually
produce any docs, but it seemed to go through more or less the
necessary steps of making valid JSDoc Toolkit docs. Regardless, even
that seems rather slow, IMHO.)

The sad part is how fast jGD's initial processing is -
"makeProjectFile" takes < 10 seconds to parse the source code. So to
have the app just quietly churn for 12-15 minutes after that while
trying to generate HTML is a bit surprising. (And the fact there's no
indication that it's doing anything, other than a pegged CPU, is
disconcerting. I can see some people thinking that the app is hung/
broken because of that).

Anyhow, I know it's not your fault - you're subject to the whims and
foibles of the XSLT code - but I wonder if it might be worth looking
at alternative templating solutions. Truth be told, the JSDoc Toolkit
approach of doing everything in JS is not unappealing. For template
developers (namely, yours truely) working in the familiar world of
HTML/CSS/JS is a lot more inviting than having to wade through XSLT.

Anyhow... just something to think about.

=============================

# of files: ~225
Lines of code: 48861

jGD tag counts:
1229 @param
951 @function
202 @var
145 @class
83 @constructor
56 @returns
45 @return
44 @inheritdesc
30 @event
28 @extends
27 @author
25 @ifunction
23 @paramset
18 @...
14 @struct
10 @interface
4 @see
3 @object
2 @namespace
1 @timestamp
1 @project

denis.r...@gmail.com

unread,
Feb 11, 2008, 7:41:54 PM2/11/08
to jgrousedoc
I wonder what is the size of project file jgrouse.xml...
Yep, seems like XSLT becomes a roadblock for large projects.
I am planning to look at Velocity-based templates, unless you have
something else in mind.

denis.r...@gmail.com

unread,
Feb 24, 2008, 7:17:50 PM2/24/08
to jgrousedoc
OK, I have finished major refactoring of jGrouseDoc and added support
for Velocity templates.
As a result, the task that used to take 38 seconds using "noframes"
skin now completes in 2-3 seconds.

The switchover is controlled by new configuration property
outputFormat
outputFormat=bin turns on the new mode
outputFormat=xml turns on the old XML/XSLT mode (default setting)

So far "noframes" is the only skin that supports new mode and I am not
sure if it is worth to provide support for other skins.

The code is in SVN, feel free to try it

Regards,
Denis
Reply all
Reply to author
Forward
0 new messages