Commit 443aa53
committed
FIX: debounce app_config->save() in wxEVT_IDLE handler (F-015)
The idle handler at GUI_App.cpp fired app_config->save() on every idle
event whenever the config was dirty. On Windows with a busy idle loop
this could produce dozens of synchronous disk writes per second.
Add a 5-second debounce using std::chrono::steady_clock so the flush
happens at most once every 5 s. Flush any remaining dirty state
unconditionally in OnExit() so no settings are lost on clean exit.
Ref: #102891 parent 91b3cb3 commit 443aa53
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
2774 | 2775 | | |
2775 | 2776 | | |
2776 | 2777 | | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
2777 | 2782 | | |
2778 | 2783 | | |
2779 | 2784 | | |
| |||
3314 | 3319 | | |
3315 | 3320 | | |
3316 | 3321 | | |
3317 | | - | |
3318 | | - | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
3319 | 3332 | | |
3320 | 3333 | | |
3321 | 3334 | | |
| |||
0 commit comments