Skip to content

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)'.

@ricki-z ricki-z merged commit 37d26c6 into opendata-stuttgart:beta Oct 13, 2024
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.

2 participants