Comments inline.

Raymond Feng wrote:
Hi,

I did some investigation by debugging into a Tuscany web app with Tomcat. My focus was on the usage of DOM. Here are some findings:

1) Tuscany uses DOM to hold the property values from the StAX stream

I think this is too heavy. Could we try the following:
- keep simple property values as simple type instances
- record StAX events representing complex property values and re-deliver them to a StAX XMLStreamReader only as needed.

2) Axis2 Java2WSDL uses DOM

There is a workaround (better for performance anyway): generate the WSDL ahead of time.

3) Rampart ws-security uses DOM

Can I assume that this is a no-op if WS-Security is not used in the application?

4) WSDL4J uses DOM


Woden seems to do better than WSDL4J now. See http://svn.apache.org/repos/asf/incubator/woden/trunk/java/src/org/apache/woden/internal/OMWSDLReader.java, which seems to use Axiom instead of DOM. How about giving it a try?

We could try to remove the usage of DOM in 1) by holding the XML events but I'm not sure if it will help to reduce the memory footprint as other projects will instantiate DOM anyway.

Both SUN and IBM JDK have Xercers XML parser bundled.

Thanks,
Raymond

----- Original Message ----- From: "Chris Lo" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Tuesday, September 25, 2007 8:03 AM
Subject: Re: Memory Footprint Tuscany 0.99 Inquiry


Hi Jean,

The following is my configuration:
- are you running a J2SE program or are you running in a WAR [War]
- are you using tuscany-sca-all.jar? [No - I use a subset of the jars -
please find the listing below]
  activation-1.1.jar annogen-0.1.0.jar avalon-framework-4.1.3.jar
axiom-api-1.2.4.jar axiom-dom-1.2.4.jar axiom-impl-1.2.4.jar
axis2-java2wsdl-1.2.jar axis2-kernel-1.2.jar
backport-util-concurrent-2.2.jar cglib-nodep-2.1_3.jar common-2.2.3.jar
commons-codec-1.3.jar commons-fileupload-1.1.1.jar
commons-httpclient-3.0.1.jar commons-io-1.1.jar ecore-2.2.3.jar
ecore-change-2.2.3.jar ecore-xmi-2.2.3.jar geronimo-commonj_1.1_spec-1.0.jar
geronimo-jms_1.1_spec-1.1.jar jakarta-httpcore-4.0-alpha4.jar
jaxen-1.1-beta-9.jar log4j-1.2.12.jar logkit-1.0.1.jar mail-1.4.jar
neethi-2.0.1.jar sca-api-0.99-incubating.jar servlet-api-2.5.jar
stax-api-1.0.1.jar tuscany-assembly-0.99-incubating.jar
tuscany-assembly-xml-0.99-incubating.jar
tuscany-binding-sca-0.99-incubating.jar
tuscany-binding-sca-xml-0.99-incubating.jar
tuscany-binding-ws-0.99-incubating.jar
tuscany-binding-ws-axis2-0.99-incubating.jar
tuscany-binding-ws-xml-0.99-incubating.jar
tuscany-contribution-0.99-incubating.jar
tuscany-contribution-impl-0.99-incubating.jar
tuscany-contribution-java-0.99-incubating.jar
tuscany-contribution-namespace-0.99-incubating.jar
tuscany-core-0.99-incubating.jar
tuscany-core-databinding-0.99-incubating.jar
tuscany-core-spi-0.99-incubating.jar tuscany-databinding-0.99-incubating.jar
tuscany-databinding-axiom-0.99-incubating.jar
tuscany-databinding-sdo-0.99-incubating.jar
tuscany-distributed-0.99-incubating.jar
tuscany-host-embedded-0.99-incubating.jar
tuscany-host-http-0.99-incubating.jar
tuscany-host-webapp-0.99-incubating.jar
tuscany-implementation-java-0.99-incubating.jar
tuscany-implementation-java-runtime-0.99-incubating.jar
tuscany-implementation-java-xml-0.99-incubating.jar
tuscany-interface-0.99-incubating.jar
tuscany-interface-java-0.99-incubating.jar
tuscany-interface-java-xml-0.99-incubating.jar
tuscany-interface-wsdl-0.99-incubating.jar
tuscany-interface-wsdl-xml-0.99-incubating.jar
tuscany-policy-0.99-incubating.jar tuscany-policy-xml-0.99-incubating.jar tuscany-sdo-api-r2.1-1.0-incubating.jar tuscany-sdo-impl-1.0-incubating.jar
tuscany-sdo-lib-1.0-incubating.jar woden-1.0-incubating-M7a.jar
wsdl4j-1.6.2.jar wstx-asl-3.2.0.jar XmlSchema-1.3.1.jar xsd-2.2.3.jar

- which Tuscany JARs do you have on your classpath? [Please see above]
- are you seeing DOM classes getting initialized? which classes?
Currently, we have not done a heap dump yet, so we can't see which COM
classes are getting itialized. However, when we were using 0.91, we
notice Xerces classes getting initialized. And after the upgrade to 0.99,
the memory footprint is almost identical to that of 0.91. That is why we
suspect that DOM classes are still being initialize in 0.99.

Thanks,
Chris


On 9/25/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

Raymond Feng wrote:
> Hi,
>
> There may be one possibility. We query all databindings to introspect
> data types on a java interface. As a result, if you use the binary
> distro which consolidates all of the Tuscany extensions into a jar,
> all of databindings on the classpath will be loaded even though they
> are registered for lazy instantiation.
>
> To disable undesireable databindings, you can comment out the them in
> META-INF/services/org.apache.tuscany.sca.databinding.DataBinding.
>
> Thanks,
> Raymond
>
> ----- Original Message ----- From: "Chris Lo" <[EMAIL PROTECTED]>
> To: <tuscany-dev@ws.apache.org>
> Sent: Monday, September 24, 2007 1:53 PM
> Subject: Memory Footprint Tuscany 0.99 Inquiry
>
>
>> Hi,
>>
>> We recently migrated our version of Tuscany from 0.91 to 0.99 in
>> hopes to
>> see a reduction on the memory footprint based on the thread started
>> by my
>> colleague:
>>
>>   Dynamic registration of databindings, was: 0.91 Memory Footprint
>>
>> However, we have not seen any difference in terms of the memory
>> footprint.
>> Our goal is to only use Axis Stax and avoid any Xerces DOM being use.
>> I was
>> looking through the Tuscany jars and was wondering if there is any
>> configuration needed to tell Tuscany to use Axis Stax. For example, in
>> tuscany-databinding-0.99-incubating.jar, do I have to modify
>> org.apache.tuscany.sca.databinding.DataBinding in the
META-INF\services\
>> folder?
>>
>> Any guidance will be greatly appreciated.
>>
>> Thanks,
>> Chris
>>
>

We need to investigate this. Having all databindings participate in the
introspection of service interfaces defeats the purpose of having a lazy initialization scheme. But before pointing at databinding issues, let me
ask a few questions to help investigate what's going on...

Could you tell us a little more about your configuration:
- are you running a J2SE program or are you running in a WAR?
- are you using tuscany-sca-all.jar?
- which Tuscany JARs do you have on your classpath?
- are you seeing DOM classes getting initialized? which classes?

Thanks.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to