Idea: Seperate PSQL query from processing
While observing the progress, I've noticed the following:
Either the IO or the CPU are use to the full extend per thread. Never both at the same time.
Meaning that the CPU idels while the PSQL query is in progress and the next query is not started until the CPU heavy part is done.
If it is prossible to seperate the query from the processing so that they can run at the same time (prefecting the next part ofc, not loading the current one) I'd expect an overall process time reduction of at least 10% which is significant on larger builds.
I'm not sure tho, how much effort it is, to implement this.