jaawerth / fennel-nvim

running fennel-lang natively in neovim
MIT License
77 stars 2 forks source link

precompile caching for faster init #3

Open jaawerth opened 4 years ago

jaawerth commented 4 years ago

Now that I have auto-sourcing of init.fnl and syncing of package.path to fennel.path working in the dev branch, eventually I'll want to look into caching/precompiling init.fnl and external plugin code for faster startup times.

Thinking I can just do a basic mtime check as part of either the require call or via a new function, compile to lua if the .fnl source is newer than the .lua source, otherwise require the lua instead. This naturally won't be done for require-macros.

One added complexity would be making sure it's tracing usage of the include special to make sure inlined files are also checked for modifications.