-
1. Re: Too much resolution?
starksm64 Oct 15, 2007 2:38 PM (in response to starksm64)Its more than just the logging that is taking the time. If I reduce the logging to INFO level, parsing a standardjboss.xml descriptor is still taking > 60 seconds:
11:33:28,038 INFO [JBoss50UnitTestCase] EjbJar21Everything_testEverything.xml parse time = 1227
11:34:34,711 INFO [JBoss50UnitTestCase] JBoss5xEverything_testStandard.xml parse time = 66673
11:34:44,040 INFO [JBoss50UnitTestCase] JBoss5xEverything_testEverything.xml parse time = 9329
Seems like we need to cache the fact that a given element is a unknown wildcard to avoid the resolution thrashing going on. -
2. Re: Too much resolution?
aloubyansky Oct 16, 2007 8:18 AM (in response to starksm64)Maybe we can have a switch whether to call resolveSystemIDasURL(). I.e. resolve entities only locally: registered and in the classpath.
-
3. Re: Too much resolution?
aloubyansky Oct 19, 2007 11:21 AM (in response to starksm64)The wildcard resolution doesn't seem to be the bottleneck. I tried adding the following check before the schema resolution to by-pass the resolution phase but it didn't improve the numbers.
if(!(schemaLocation == null && "".equals(qName.getNamespaceURI()))) { ...
-
4. Re: Too much resolution?
starksm64 Oct 19, 2007 12:22 PM (in response to starksm64)Well, when I added the following "http://www.jboss.com/xml/ns/javaee" namespace binding to the JBoss50MetaData.class the binding time speed up 10x:
public static SchemaBindingResolver initResolver() { DefaultSchemaResolver resolver = new DefaultSchemaResolver(); resolver.addClassBindingForLocation("ejb-jar_2_0.dtd", EjbJar20MetaData.class); resolver.addClassBindingForLocation("ejb-jar_2_1.xsd", EjbJar21MetaData.class); resolver.addClassBindingForLocation("jboss_3_0.dtd", JBoss50DTDMetaData.class); resolver.addClassBindingForLocation("jboss_3_2.dtd", JBoss50DTDMetaData.class); resolver.addClassBindingForLocation("jboss_4_0.dtd", JBoss50DTDMetaData.class); resolver.addClassBindingForLocation("jboss_4_2.dtd", JBoss50DTDMetaData.class); resolver.addClassBindingForLocation("jboss_5_0.dtd", JBoss50DTDMetaData.class); resolver.addClassBindingForLocation("jboss_5_0.xsd", JBoss50MetaData.class); // Workaround wildard resolution slowness resolver.addClassBinding("http://www.jboss.com/xml/ns/javaee", JBoss50MetaData.class); return resolver; }