holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.8k stars 519 forks source link

Combine throttle implementations #7480

Closed philippjfr closed 1 week ago

philippjfr commented 1 week ago

We had two throttle JS implementations, both were flawed.

  1. The one used for throttling streaming HTML output was actually debouncing, causing updates to be stalled until the streaming stopped.
  2. The implementation used elsewhere was mostly okay but did not implement trailing execution which meant that if the final update was never executed if the previous update occurred within the timeout period.
codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.37%. Comparing base (cf9dc6b) to head (7793f0b). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7480 +/- ## ======================================= Coverage 82.36% 82.37% ======================================= Files 338 338 Lines 50964 50964 ======================================= + Hits 41977 41981 +4 + Misses 8987 8983 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.