AnyLint icon indicating copy to clipboard operation
AnyLint copied to clipboard

Improve performance on subsequent runs by precompiling executable

Open Jeehut opened this issue 2 years ago • 0 comments

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.

Jeehut avatar May 04 '22 20:05 Jeehut