Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: check file change date/hash and only reload if changed #13

Open
laundmo opened this issue Jun 1, 2021 · 2 comments
Open

Comments

@laundmo
Copy link
Contributor

laundmo commented Jun 1, 2021

stat the file, or compare to previous hash, to only reload the code when changes occured.

@laundmo laundmo changed the title improvment: check file change date/hash and only reload if changed improvement: check file change date/hash and only reload if changed Jun 4, 2021
@s39674
Copy link

s39674 commented May 20, 2022

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.

@laundmo
Copy link
Contributor Author

laundmo commented May 20, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants