That was my original intention however it is very, very memory intensive. It works pretty good for a small subset of morederately sized source but as the source base grows (in our case we have 100s if not 1000s of source files that must be scanned) it performs very terrible. I'd love to resolve this memory issue but I have little time. I have been digging through XJavadoc's source and trying to find where the problem is. Apparently there is no way to dump SourceClass objects and ProgramElement objects after they've been created. Ideally I'd like to Create them as needede then dump then for garbage collection when done. I noticed a big jump in memory usage when I started scanning for certain methods. For example, one part of my tool looks for the ejbCreate method by iterating method names. The engine has to create method objects to read these names and once done they apparently stick in memory. Ever since I put that piece in I get out of memory errors all the time and it even slows my WinXP box to a crawl after it errors out. It forced me to up the JVM memory to 740M via ANT_OPTS and increase my page file size to nearly 2G. Even with this big a page file, a few runs of the build leaves me with little or no virtual memory. I'm not sure if this is an Ant bug, a JVM bug or what. It seems to me that all the memory (virtual or otherwise) should be freed once the process completes. I'd love to share the source but I have to check with my boss and see if it breaks the confidentiality agreement I signed.

Clifton C. Craig, Software Engineer
Intelligent Computer Systems -  A Division of GBG
2101 Embassy Drive
Lancaster, PA  17603

Phone: 717-295-7977 ext. 621
Fax: 717-295-7683
[EMAIL PROTECTED]
[EMAIL PROTECTED]




Lee Marlow wrote:

Clifton,

Is this tool something you plan to contribute back to the community?  I know
my team would greatly appreciate it, as we moved to XDoclet halfway through
the project and still have quite a few non-XDoclet EJB's.

Just curious.

-Lee Marlow

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Clifton C.
Craig
Sent: Tuesday, April 13, 2004 7:50 AM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] XJavadoc is too memory intensive


Hello all,


I've been toying with using XJavadoc to reverse engineer a bunch of deployment descriptors into Java source as XDoclet tags. It's been working pretty good except for one thing. The XJavaDoc API sucks memory dry. I have a rather large project involving hundreds of EJB java files and I cannot find an efficient way to feed them into the XJavaDoc engine as source classes when useNodeParser is set to true. I started trying to feed them all in as one big SourceSet. Then when I kept getting out of memory errors I tried feeding them in 3 at a time creating a new XJavaDoc object for each set of 3 EJB beans. I ended up recoding the XJavaDocTask and creating a new XJavaDoc object for each class. Now at least it works but it runs like a snail. (Do snails run?) I looked for a method to empty the source set in the XJavadoc object so I at least wouldn't have to null and recreate it each time but I found nothing. What's a developer to do?





-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to