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
{{ message }}
Repository navigation
ProgressCallback should be throttled instead of debounced #86131
This basically means that while I'm continuously reporting progress updates, the displayed progress doesn't update. It only updates once it's been more than 100 milliseconds since I last reported progress.
I think what you meant to do is throttle the progress updates (update the displayed progress once every 100 milliseconds) rather than debounce (only update once it's been 100 milliseconds since the last call).
Basically to work around this I have to throttle my own calls to progress.report to > 100 milliseconds.
Benjamin Pasero (@bpasero) also why roll your own debounce implementation instead of just using lodash debounce/throttle? If you were using lodash I could easily PR a fix to use lodash's throttle instead.
It "merges" repeated progress calls into a single progress RPM, but a faulty conditional prevents repeated increment values from being added together to sum up to the final value.
However AFAICT the increment reducing works fine now, the problem is just that updates are debounced instead of throttled.
Andy Edwards (@jedwards1211) yeah I think you are on the right path, can you come up with a sample extension that demonstrates the problem simply by producing progress updates in a way that it shows the issue and proofs your fix?
Sure, I may not get to that until Monday but will do! And I did already confirm that my workaround works (throttling my calls to progress.report to > 100 milliseconds)
Activity
jedwards1211 commentedon Dec 3, 2019
The OP on #54295 had presumed the following:
However AFAICT the increment reducing works fine now, the problem is just that updates are debounced instead of throttled.
fix(extHostProgress): throttle instead of debounce
bpasero commentedon Dec 6, 2019
Andy Edwards (@jedwards1211) yeah I think you are on the right path, can you come up with a sample extension that demonstrates the problem simply by producing progress updates in a way that it shows the issue and proofs your fix?
jedwards1211 commentedon Dec 6, 2019
Sure, I may not get to that until Monday but will do! And I did already confirm that my workaround works (throttling my calls to
progress.reportto > 100 milliseconds)jedwards1211 commentedon Dec 8, 2019
Benjamin Pasero (@bpasero) okay, I created https://github.com/jedwards1211/progress-issue-demo to demonstrate the issue. Instructions are in the README
fix(extHostProgress): throttle instead of debounce (#86161)