AnyLint
AnyLint copied to clipboard
Improve performance on subsequent runs by precompiling executable
Problem Statement
Currently, when running the Swift script even with no changes to the Script file, the whole Swift compiler is started fresh leading to the script taking a few seconds and letting one wait longer than needed.
Suggested Solution
Instead of simply running the Script file via swift-sh, wrap it in a command line container and build an executable file. Then reuse that executable file as long as the Script file contents are identical, e.g. by saving its SHA hash. This is like a caching mechanism.