Add a threadpool and run the comparison of each file with all files after it in a different thread #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Duplo's job is embarrassingly parallel and thus the usage of a threadpool is the easiest way to speed up Duplo's runtime.
This is a classic case of trading larger memory consumption for faster runtime.
Even the most basic laptops nowadays have at least 8GB of RAM, and not using all of the available memory is a waste.
For enterprise machines, which can have 100s of GB of RAM is trade-off of memory for runtime reduction is especially appreciated.
Users can elect to run the tool with a single thread (-j 1) in order to revert to the old behavior, with no extra cost in memory.
The only synchronization between the threads is the logging messages by the exporter, which are printed by each thread when it finishes comparing a file with all other files after it.
Quake 2 runtime and memory scaling:

GCC 15.1.0 runtime and memory scaling:
