The parallelisation algorithm is simple and effective enough as most dependency trees have many dependencies for each node making the graph look triangular to a very wide base triangular. Note that this is not the most effective parallelisation algorithm. Building the nodes that have parents with few children first is more effective as it maximizes tha number of build thread that are active. This means that we build hight first instead for depth first. Since nodes have diffrent build time, the parallelisation algorith (in fact the prioritisation of the terminal nodes) should be dynamic to be optimal and in that case, should take into account the load on the cpu building the node as build time is not only a factor of the CPU but also network and other I/O.
keeping previous build time to build the longest nodes to build first can also make the end of the build more effective as it keeps the builder pool full.
Khemir Nadim ibn Hamouda. email@example.com