> I'm trying to chase down a performance issue using Websphere 5.1 andAxis
1.1.
> What we're finding is that on the server the
> org.apache.axis.encoding.ser.SimpleDeserializerFactory.
> getDeserializerAs()
> call is taking a very long time for even simple strng classes.
> Apparently, it's trying to find a specialized deserializer,
> calling loadClass, bubbling through a bunch of stuff only to
> find that no such class exists. Eventually, it reverts
> back to the GeneralPurpose deserializer, and things work as
> expected.
>
> Is there someway to speed up, cache, or short circuit this check via
> configuration?
After peeking at the 1.2RC3, code, here's what we came up with as
a modification of BaseFactory.java. It improved the throughput
of our test case by over 100%.
Can anyone see any issues with this as a workaround until 1.2
is released?
protected Method getMethod(Class clazz, String methodName) {
String className = clazz.getName();
Map cache = getMethodCache();
Method method = null;
// Check the cache first.
if (cache.containsKey(className)) {
method = (Method) cache.get(clazz);
return method;
}
->
-> //********** START WORKAROUND *************
-> if (clazz.isPrimitive() || className.startsWith("java.")
|| className.startsWith("javax."))
-> {
-> return null;
-> }
-> //********** END WORKAROUND ************************
->
try {
method = clazz.getMethod(methodName, new Class[]{String.class,
Class.class, QName.class});
} catch (NoSuchMethodException e) {
}
(etc)...