jscl
jscl copied to clipboard
Files are recompiled unneccessarily
Builds are starting to take over a minute on my laptop, and one way to speed them up significantly would be to avoid recompiling files that haven't changed since the last build. The compiler could be modified to produce "javascript object files" (with a .jso
extension perhaps?), which could have their time of last modification compared against the source .lisp
file. If the object file has been changed more recently, there is no need to recompile. Then, in the final step, all of the object files could be "linked" together to produce the final "jscl.js" file. The same idea could work for the "tests.js" file.
Do you forsee any significant issues with this idea, with the way the current compilation process works? One problem is that if the compiler itself has been changed, all of the files would have to be recompiled, but it would be easy enough for me to add a clean
argument to the make.sh
script to deal with this.
I approve the idea. I think there is not any problem at all, but we will have a look. Also, we can profile the bootstrap to try to speed up a little bit.
I have a mostly complete implementation on my obj-files branch, but I can't figure out this last bug that occurs on a second compile. That is, after the object files have been created, and all that needs to be done is read in the environment data from each one and append all the javascript code into one file. You know more about the compilation process than me and I've been banging my head against this for a few days, maybe you could take a look?
Sorry, I was finalizing the codegen
pull request. I will try to figure out what is wrong tomorrow.