Reduce the 'percent' signal emission frequency in ThunarTransferJob.
GIO generates a lot of calls to the progress callback. If we simply forward those to the GUI in the form of 'percent' signals, we cause the CPU usage of the X server to go up dramatically (up to around 50%). A better solution is to only emit the 'percent' signal from time to time but frequently enough for progress bars to advance smoothly. This is what this commit changes. From now on 'percent' is only emitted when the percentage has increased by more than 0.05 percent since the previous emission.
Loading
Please register or sign in to comment