reloading
reloading copied to clipboard
improvement: check file change date/hash and only reload if changed
stat the file, or compare to previous hash, to only reload the code when changes occured.
Hi @laundmo,
I don't see why would you use reloading
for that. You could just use a timer that every so often check the file's hash and if that changed it execute the code.
to clarify: i meant to only reload if the file has changed, not to run the code on a timer.
this is so that reloading has the performance impact of just a single stat
, instead of "reloading" even if the file has no changes.