Baobab UI becomes unresponsive on directories with many subdirectories
When using Baobab to scan a directory with a large number of subdirectories, the UI becomes completely unresponsive and the user cannot cancel the scan or use the UI to quit the program.
Steps to reproduce:
- Make a lot of directories with something like:
time for i in $(seq 100000); do mkdir `perl -e 'print "a" x 245'`$i & done
(warning, this will take a long time, roughly 15 minutes for me) - Then scan with Baobab
Actual results: The Baobab UI freezes until it is completely done scanning.
Expected results: The Baobab UI will continue to respond to input.
This patch fixes the problem by limiting the amount of time that is spent processing results to roughly 100ms at any given time, after which the next call to process more results will be skipped, giving control back to GTK to process input events: manyfiles.patch
Edited by Ghost User