Hello,

I'm seeing big performance difference on a code using xmlbeans when running
it from main and test methods. I'm using the same big XSD file as input in
both runs.

I've created a small gradle project, which is attached, to demonstrate this
scenario:

Running from test scope: *gradle test --rerun-tasks --info*
*Time Elapsed: 141792*

Running as application: *gradle run*
*Time Elapsed: 6586*

Additional info:
  xmlbeans version: *5.0.3*
  method used in the sample application: *XmlBeans.compileXsd*
  input file size:* 1.1mb , ~26k lines*

Profiling the test run I can see that it takes most of the time in method
*org.apache.xmlbeans.impl.store.Cur.isOnList()* . Weirdly when I run it as
application it never reaches this method.

I ran the same code using different java versions (1.8, 11), xmlbeans
versions (2, 3, 5), build tools (maven and gradle) and different test
frameworks (junit 4, 5 and testNG) and the behaviour is the same in all of
them.

Does anyone have any direction on how to solve this problem? As I'm calling
a few xmlbeans methods each test is taking more than 5 minutes whereas
while running the application the same code takes less than 10 seconds.

--
Best Regards,
Vinicius Hanrejszkow,

<<attachment: sample_project.zip>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org

Reply via email to