You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should have explained this. Please notice that the back_off_factor variable isn't the actual sleep time, it's a factor.
Let's simply the logic.
back_off_factor = 1
while not closed:
refresh_wait = 5 # although it could be something else, let's assume that it is 5
with self.sleeper(refresh_wait * back_off_factor):
...
if not self.reload():
back_off_factor = max(back_off_factor * 1.3, 10.0)
else:
back_off_factor = 1
Suppose self.reload() returns False 5 times in a row, and the values of back_off_factor are 1, 10, 13, 16.9, 21.97, 28.561. The actual sleep times refresh_wait * back_off_factor are 5s, 50s, 65s, 84.5s, 109.85s, 142.805s.
But if we change the max() to min(), the back_off_factor sequence is 1, 1.3, 1.69, 2.197, 2.8561, 3.71293. And the actual sleep time sequence is 5s, 6.5s, 8.45s, 10.985s, 14.2805s, 18.56465.
I believe this is a logical error and min() should be the correct one, because a 10 times longer sleep time for the first failure makes no sense.
Why should the back off factor be capped at 10 ?
Since refresh_wait is the suggested refresh interval, 10 times refresh_wait should be large enough for backing-off.
Have you noticed a memory leak after a few hours?
My RAM gets overloaded after a few hours.
The problem occurs when opening dash + key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.