Skip to content

Commit

Permalink
record delay after using the last one
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 12, 2025
1 parent 55c63aa commit 46cc6bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1614,9 +1614,6 @@ def do_damage(self, ww : int, wh : int, x : int, y : int, w : int, h : int, opti
delay = max(0, delay-elapsed)
actual_encoding = options.get("encoding", self.encoding)
self._damage_delayed = DelayedRegions(now, regions, actual_encoding, options)
lad = (now, delay)
self.batch_config.last_delays.append(lad)
self.batch_config.last_delay = lad
expire_delay = min(self.batch_config.expire_delay, delay)
#weighted average with the last delays:
#(so when we end up delaying a lot for some reason,
Expand All @@ -1634,6 +1631,9 @@ def do_damage(self, ww : int, wh : int, x : int, y : int, w : int, h : int, opti
expire_delay += inc
except IndexError:
pass
lad = (now, delay)
self.batch_config.last_delays.append(lad)
self.batch_config.last_delay = lad
damagelog("do_damage%-24s wid=%s, scheduling batching expiry for sequence %4i in %3i ms",
(x, y, w, h, options), self.wid, self._sequence, expire_delay)
damagelog(" delay=%i, elapsed=%i, resize_elapsed=%i, congestion_elapsed=%i, batch=%i, min=%i, inc=%i",
Expand Down

0 comments on commit 46cc6bd

Please sign in to comment.