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 8031ff7 commit a181b0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xpra/server/window/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -1656,9 +1656,6 @@ def do_damage(self, ww: int, wh: int, x: int, y: int, w: int, h: int, options: d
delay = max(0, delay-elapsed)
actual_encoding = options.get("encoding", self.encoding)
self._damage_delayed = DelayedRegions(damage_time=now, regions=regions, encoding=actual_encoding, options=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 @@ -1676,6 +1673,9 @@ def do_damage(self, ww: int, wh: int, x: int, y: int, w: int, h: int, options: d
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 a181b0c

Please sign in to comment.