cancel
Showing results for 
Search instead for 
Did you mean: 

Java mapping underperformance?

Former Member
0 Kudos

Dear experts,

Iu2019ve small java mapping that was developed following a how-to that uses dom4j classes. The mapping is retrieving the expected result, however every time I run a test at the Operation Mapping object several dom4j classes are loaded before the mapping (checked at the mapping log) and it takes too long (more than 4000 milliseconds) to map a couple of fields.

Questions:

1. At runtime are these classes loaded every time a mapping is called?

2. Does the test environment have the same performance of the runtime environment?

I'm just wondering if I need to rework the mapping to make it more fast or this behavior of loading classes only occurs at test environment and no rework is necessary.

Thanks in advance,

Jorge

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>> At runtime are these classes loaded every time a mapping is called?

Yes, It will load all the required classes during runtime.

>>2. Does the test environment have the same performance of the runtime environment?

Are you referring your test box with production Box? Normally production server has better in memory and powerful processor than test box. If so, in production you might not see 4000 milliseconds. certainly lesser than this value.

You could certainly rework on it. Jdk 1.6 provides XML API directly. You dont need to import dom4j open source jars... But performance improvement is not just using external apis. Unless we see the logic written in java mapping, its hard to say where the performance goes bad.

Hope answered your question.

Former Member
0 Kudos

Hi Baskar,

2nd question - I meant the performance difference between the test tab at Operation Mapping and the runtime of PI. Is runtime faster or it is the same as this test tab uses the same engine?

I need to know how to get the content of some fields for Dynamic configuration, currently I'm doing like this with dom4j classes:

try

{

document = saxReader.read(in.getInputPayload().getInputStream());

}

catch (Exception e) {...}

try

{

nodeName = document.selectSingleNode("//FIELD1");

field1 = nodeName.getText();

}

The remainder is copying the input to output as the source and target structure are equal.

If you can tell me how to do it with sdk 1.6 classes, maybe I can discard the dom4j classes.

Thanks and regards,

Jorge

Edited by: Jorge Cunha on Apr 3, 2011 11:24 PM

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>2nd question - I meant the performance difference between the test tab at Operation Mapping and the runtime of PI. Is runtime faster or it is the same as this test tab uses the same engine?

Sure runtime will be faster than testing at design level tool at operation mapping.

Below is the link shows that jdk 1.6 supports XML API parsers...

http://download.oracle.com/javase/6/docs/api/javax/xml/parsers/package-summary.html

Hope that helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

done! Thanks

Jorge