Commit 107fe52
Fix excessive screen updates in progress indicators (#14206)
* Initial plan
* Fix excessive screen updates during wsl --export
Only update progress display when file size actually changes, preventing
unnecessary screen redraws and reducing CPU/GPU overhead.
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
* Address code review: initialize previousSize to 0 instead of -1
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
* Complete fix for excessive screen updates during wsl --export
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
* Clean up: remove codeql symlink and add to gitignore
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
* Revert .gitignore to original state
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
* Compare MB values instead of raw bytes to prevent unnecessary redraws
When file size grows in sub-MB increments, comparing raw bytes causes
redraws even though the displayed MB value hasn't changed. Now we
calculate and compare the MB value directly, ensuring the progress
indicator only updates when the displayed value actually changes.
Also initialize previousSizeMB to -1 to ensure initial progress is
always shown (even when starting at 0 MB).
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
* Cache string in UpdateProgress instead of caching values in caller
Move the duplicate string check into ConsoleProgressIndicator::UpdateProgress()
itself. This provides a more general solution that prevents printing the same
string twice for any caller, not just the file size case. The comparison now
happens at the string level, which handles all formatting variations and makes
the fix more maintainable.
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>1 parent 31ecc49 commit 107fe52
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| |||
0 commit comments