dice-group / LIMES

Link Discovery Framework for Metric Spaces.
https://limes.demos.dice-research.org/
GNU Affero General Public License v3.0
129 stars 54 forks source link

Speed up compilation by parallelizing tests #247

Open KonradHoeffner opened 3 years ago

KonradHoeffner commented 3 years ago

On a desktop Intel Core i7-9700 @ 3.00 GHz with 8 cores and no hyperthreading, mvn test takes 36.2s.

To improve this, you can enable parallel testing in the surefire plugin configuration in pom.xml:

<configuration>
    [...]
    <parallel>all</parallel>
    <useUnlimitedThreads>true</useUnlimitedThreads>
</configuration>

See https://www.baeldung.com/maven-junit-parallel-tests.

However when I tested this, the tests got stuck, as there is probably some test code that is not prepared for parallel execution.

As an alternative, I tested <forkCount>4</forkCount>, however that was slower with 48.7s.

So it seems like the naive approach doesn't work but maybe the main developers are interested in picking this up and investigating, how this can be fixed.