Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XML Parsing far too slow. (How can I speed it up)

843840Dec 1 2007 — edited Dec 12 2007
Hey everyone,

I am converting a site from ASP to JSP and there are a bunch of pages that parse an XML document display certain information from it. One problem is that the JSP implementation I have is far too slow. It takes ~6 seconds to load the page as we wait for it to process. I am using <x:parse> and <x:forEach> to process it using an XPath statement with the appropriate predicate ($dom/foo/bar/Route[ID > 999] for example)

One problems I think is the size of the XML document. All the data for different pages is pushed to the same XML file and we use maybe 5-10% of the data in any one parse. I have looked at XML filters a little bit but can't seem to find a good example or a clear explanation as to whether or not this will even solve my problem.

The root node has 5 children and the biggest one which takes up probably 3/4 of the document isn't even used by us.

My boss wants it to be as fast as the ASP implementation which was really fast. It is 100% custom and manually probes the XML document and can skip any children which it knows won't contain any leaf's we want (mainly that big one) and is nearly instant.

Does anyone have any ideas?

Thanks,

John
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2008
Added on Dec 1 2007
9 comments
1,062 views