I don’t think laziness would help much as long as you’re still compiling at the level of modules or packages. I remember seeing fragnix
some time ago. It splits up packages and modules such that each function gets it’s own module and it does not compile more ‘modules’ than it needs.