> > Following on from the idea of an event based model it
> struck me that there's
> > already a fairly good system for handling even based tree
> info (Java source
> > files can be looked at as trees) and that's SAX. So the
> code I've got here
> > generates SAX events from a Java source file, it's then
> should be possible
> > to apply XSL style sheets to them to view the code in
> different ways e.g.
>
> ... not without any major performance overhead :(
To be honest JXR a the moment it not very good performance wise. It's
parsing over every line of code 11 times and doing a lot of string
manipulation which I don't think is the fastest way of doing things. We
should just be running through the code and then using a renderer to
actually render the blocks of code into HTML once. This basically leads to
and event based model. I did start down this route but decided that I'd be
better of using Antlr to parse the source code rather than trying to write
my own.
As far as the events go what I think would be needed is something that says,
"I've started such and such block", "I've finished this block" which is
basically SAX so even if we never use XML the event model would still fit.
>
> XML/XSLT was *not* part of JXR1 for a reason... When you have
> a LOT of projects
> to generate source for it shouldn't take 10 hours just
> because of XSLT :(.
> There are some downsides to JXR1 but this is for performance reasons.
>
At the moment JXR doesn't seem to check to changed files properly to it
rebuilds every. I'm sure this is a bug as I've seen comments in the code
that refer to it doing it, but I 'm not convinced that the current version
of JXR is maintainable. CodeTransform is doing far to much and it's vary
confusing to work with.
> The major problem is the linking which you have to do via a
> two step process.
> You can do one step with an event model but you have to have
> everything in
> memory and then dump it.
I've not sure you need every thing, I think you just need the interfaces and
an event listener could be set-up to listen for class and method events and
keep those whilst ignoring all the if's else's etc.
Having said this I've not got that far in JXR2 yet it's very much a thought
experiment at the moment.
>
> > Javadoc or JXR style.
>
> Granted it would be nice to have a mechanism like this for an
> open Javadoc style
> engine (just rewrite your XSLT to include only Javadoc) but I
> think it wouldn't
> scale. Granted this would be REALLY nice on the low end.
> The problem is I
> originally saw Alexandria working as ONE BIG REPOSITORY for
> tons of source code
> projects. If you have 100 projects under Alexandria this
> would break it :(
> Hopefully Moores Law will come to the rescue some day...
If we can compile 100 projects, then converting them to HTML should be
possible. Currently JXR does have a habbit of running out of memory in the
JVM. In order to scale we'd need to look at persisting some information on
the file sytem fo that it can be paged.
>
> In short I generally think this is a good idea but the major issue is
> performance. Back when I originally wrote Alexandria it was
> taking about 5
> hours to run. Adding XSLT to JXR would have killed it even
> further. If you can
> get this feature set done within an acceptable performance
> curve I would be a
> big +1024 but I would like to see it...
Basically if it works we'll all be over the moon, but if it doesn't we'll
know why it's a bad idea ;o)
I'm hoping that be deal directly with SAX event and not character streams I
can maintain a reasonable preformance in the same manner as Cocoon2 performs
much better then Cocoon1. Also making sure that we keep any XSLs in memory
removes the overhead of recompiling those.
>
> Do you have any performance metrics you can publish for you
> code/proposal?
>
I'll sort somthing out, the test code that's there at the moment does report
the time taken to run each test, but things are far from optimal at the
moment.
> Kevin
>
> - --
> Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED],
> [EMAIL PROTECTED] )
> Cell: 408-910-6145 URL: http://relativity.yi.org ICQ:
> 73488596
>
> Yes I know my enemies, they're the teachers who taught me to fight me;
> compromise, conformity, assimilation, submission, ignorance,
> hypocrisy,
> brutality, The Elite. All of which are American Dreams.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.4 (GNU/Linux)
> Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
>
> iD8DBQE63j/RAwM6xb2dfE0RAtm1AKCVbqITuaxjkSetTG3BkELANcYP0QCeNtx0
> s/W6vialZ+RkJdRba/uoBic=
> =aCUH
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]