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

Added KEEP_ALIVE_TIME_MS period in favor of web interface; #967

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

gvidinski
Copy link
Contributor

Hi guys,
The newly added 'Power saving' option by @basilfx is great. If activated, it has one drawback though which results in adding delay while web pages are served.
Added 'keepAlive' check to fix that issue caused by 'delay (sleep)' at the end of 'loop ()' function.
This way 'sleep' will be set to 0 milliseconds for the period of 'KEEP_ALIVE_TIME_MS' after 'last_page_load' time which is set to reasonable 30 seconds. This should be enough if one needs to browse around the web interface without being disturbed by annoying delay in page serve.
Additionally, some refactoring was done, and early exit added (sleep > 0) for the 'delay(sleep)' call instead of calling 'delay(0)'.

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

Successfully merging this pull request may close these issues.

None yet

1 participant