aspose file tools*
The moose likes Performance and the fly likes xml message passing performance consideration! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "xml message passing performance consideration!" Watch "xml message passing performance consideration!" New topic
Author

xml message passing performance consideration!

Anand Rajamani
Greenhorn

Joined: Sep 18, 2009
Posts: 5
Hi, I'm using TIBCO rv to receive a message. This message has an XML
document.I have to send this content to the java layers

The current implementation converts it to byte codes and send it to the java.

I want to go for more optimized memory usage.
What s the best way to do it.

It is a synchronous request.

advise.

Regards
A.S

There should not be any response delay also.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
You need to give us more information. xml compresses well, so you could try to compress the xml in memory.


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
Given that TIBCO seems to put huge emphasis on compact and fast, you may already have the fastest implementation.

What does
converts it to byte codes and send it to the java.
mean anyway?

How much data from the XML message do you need to store?

Bill
Anand Rajamani
Greenhorn

Joined: Sep 18, 2009
Posts: 5
The TIBCO BW Engine has got a java palette which has the logic written to conver the XML String to byte[] and pass it on to java layer.

This change we are looking for because the xml size is huge and we are experiencing out of memory and wanted to optimize all areas where the memory is loaded.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
I would do the following.

Use the byte[] to create an InputStream or InputSource or whatever your XML library has for input to a SAX style parser.

Go through the rather tedious exercise of writing the extension of org.xml.sax.helpers.DefaultHandler (or whatever library you are using) code to extract the needed data fields from the SAX events.

This avoids creating the typical huge DOM structure in memory and is astonishingly fast to execute (but slow to program.)

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xml message passing performance consideration!