[jdom-interest] jdom 1.1
Jason Hunter
jhunter at servlets.com
Tue Sep 2 10:32:03 PDT 2008
Paul, can you send me the necessary files to reproduce this? I
suspect I only need catalogueDOM36.xml. I'll figure it out and if
it's a real issue make a 1.1.1 release.
-jh-
On Sep 1, 2008, at 6:22 AM, Paul Libbrecht wrote:
> Katia,
>
> what you sent me is bit too much info... and it is not compilable as
> is. Also it will not come to the mailing-list. You need to send a URL.
>
> I have written the below test which seems indeed to confirm your
> claim to my surprise.
> Run with your 74Mb DOM-torture, I get the file parsed in 160s with
> jdom-1.0 while I have to break it after 10 minutes in jdom-1.1.
>
> I also had to change the max-heap-size allocated:
> - with jdom-1.0, 512Mb was not enough but 1024 was
> - with jdom-1.1, 1024 was not enough, the one I interrupted was with
> 1500m (but then my machine started to become unresponsive).
>
> The document is what you posted, I suppose it is coming from some
> external source, it seems to be a pretty straight SQL-like document
> with huge child-list somewhere, something for which there are far
> better processors then the all-flexible JDOM! (and even there,
> there's a JDOM contrib that goes in this direction I think, giving a
> record at a time).
>
> paul
>
> PS: my invocations
> java -Xmx1024m -classpath .:jdom\ 1.0/jdom.jar Parse
> catalogueDOM36.xml
> java -Xmx1024m -classpath .:jdom\ 1.1/jdom.jar Parse
> catalogueDOM36.xml
> (out-of-memory, see below, also had one with text-append)
> java -Xmx1500m -classpath .:jdom\ 1.1/jdom.jar Parse
> catalogueDOM36.xml
>
>
> import org.jdom.input.SAXBuilder;
> import java.io.File;
> public class Parse {
> public static void main(String[] args) throws Throwable {
> long now = System.currentTimeMillis();
> new SAXBuilder().build(new File(args[0]).toURL());
> System.out.println("Have lasted : " +
> (System.currentTimeMillis()-now));
> }
> }
>
>
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at org.jdom.ContentList.ensureCapacity(ContentList.java:355)
> at org.jdom.ContentList.add(ContentList.java:234)
> at org.jdom.ContentList.add(ContentList.java:131)
> at java.util.AbstractList.add(AbstractList.java:91)
> at org.jdom.Element.addContent(Element.java:811)
>
>
> Le 01-sept.-08 à 14:34, katja.radelicki at colruyt.be a écrit :
>
>> ***********************
>> Warning: Your file, difference jdom.zip, contains more than 32
>> files after decompression and cannot be scanned.
>> ***********************
>> in the attachement you can find all the necessary things. I have
>> tested it again and I got the same strange result.
>>
>> Regards,
>> Katja
>>
>> Katja,
>>
>>
>> What you describe is scary and I noticed nothing of that.
>> Could you make your test-case a bit more easy to reproduce? (the
>> styled text below is not nice to copy, the xml files are missing).
>>
>> Posting it all on the web, e.g. as a zip, would help.
>> I see that jdom doesn't have a bug tracker, if you prefer such a
>> method, you can happily post this in our bug-tracker
>> (jira.activemath.org, project activemath, component omdocjdom).
>> Maybe we can even discuss a jdom project there.
>>
>> paul
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/
> youraddr at yourhost.com
More information about the jdom-interest
mailing list