eclipse-ee4j / metro-jax-ws

metro-jax-ws
https://eclipse-ee4j.github.io/metro-jax-ws/
BSD 3-Clause "New" or "Revised" License
72 stars 40 forks source link

Loading of metro-default.xml for each invocation of getPort #570

Open Tomas-Kraus opened 2 years ago

Tomas-Kraus commented 2 years ago

Each time getPort is called to create a proxy, the class MetroConfigLoader opens the resource META_INF/metro-default.xml.

This file is located in the webservice-rt-2.3.jar which has a size of ~14MB.

Opening this resource take initally about ~1.5 seconds on a core-i5-4300m. Subsequent calls taking about 100ms. This delay seems to be caused by loading the webservice-rt-2.3.jar with such a URL zip:/APP-INF/lib/webservices-rt-2.3.jar!/META-INF/metro-default.xml

To ensure that the loading causes the times i have patched the class TubelineAssemblyController by storing the MetroConfigLoader-Instance as static variable.

After the patch, the first loading will still takes ~1.5s, the next calls taking no measurable time (0 ms).

I think there are several possible solutions:

a) replace the loading of the metro-default.xml by a class which produces the same output by hardcoding the values

b) making the url of the metro-default.xml configurable, so the file can be loaded from another place than a large jar-file

Environment

Java 1.7, Weblogic 12

Affected Versions

[2.3]

Source: https://github.com/javaee/metro-jax-ws/issues/1182 Author: glassfishrobot