The install.bash script for installing RCAR libraries (cf. #44) suffers from a few performance and usage bottlenecks:
Libraries are always compiled, even if there are no changes in their source code.
Library dependencies are not analysed; the current compilation in lexical order is just by chance correct.
Libraries are only installed in parallel for different Scheme systems (cf. #95). With a proper dependency analysis independent libraries could be installed in parallel even for the same Scheme system.
These shortcomings can be improved and better parallel installation supported as follows:
The SHA3-512 hash of the concatenated sources of a library can be used to decide if a reinstallation is required. Incremental installation is achieved by only installing a library if it is stale, i.e., either its source or any of its required libraries changed (has been reinstalled).
By simply always checking -- and if required reinstalling -- all required libraries right before installing the dependent library itself, point (2) is fixed. This strategy would be very inefficient in general -- even buggy due to potentially producing stale libraries -- without the hash-based incremental installation because a library required by several others would be compiled over-and-over again although its sources didn't change. But with the hash-based avoidance of unneeded reinstallations, this strategy is correct.
The configuration and spawning of parallel installation background-processes can be done without any locking. Only the actual installation of binaries from the sources of a library for a specific Scheme system has to be protected by an individual mutex (each manipulation of the binaries for a certain library and Scheme system is its own critical path).
The
install.bash
script for installing RCAR libraries (cf. #44) suffers from a few performance and usage bottlenecks:These shortcomings can be improved and better parallel installation supported as follows: