Hi
I have questions regarding performance and architecure of CdiUnit.
We use CdiUnit to run tests in our application which has a quite big classpath, including MBs of JARs.
This makes starting up a single test quite slow.
A first analysis showed that more than a second is spent in scanning the classpath by WeldTestUrlDeployment.populateCdiClasspathSet() which then finally delegates to ClassGraphScanner.getClassPathURLs.
To improve performance, I just commented populateCdiClasspathSet out and always return true in isCdiClass() - and it seems that all our tests are running fine.
So my questions are:
- Why do we have to scan the whole classpath necessary? I always had the impression that this should not be needed as we have to declare addtional dependencies using @AdditionalClasses etc.
- If I comment populateCdiClasspathSet out and tweak isCdiClass as described, tests using which functionality would fail?
Many thanks
Thomas