Commit e713c90c authored by Committed by Kurt HindenburgBrowse files
Only recalculate the directories when we change dirs
Whenever we trigger something that redraws the screen we trigger all the filters, and the FileFilter - that looks for files and folders in the current directory - is constantly re-triggered to. The creation of the vector / set containing all files takes now around 30msec, but searching takes just 3 - 4 msec. If we only generate the list of files when we change directories, this goes down from 34 msec to just 4, making konsole consume less cpu, spend less energy and help with battery when we are selecting text or updating the screen with new data. This fails to highlight a file if the file is created after we read the files in the directory, as we are not updating the list of files anymore. Not an acceptable loss, we need to fix this, but not by re-reading all of the files in folders and subfolders on every mouse move.
Showing with 8 additions and 4 deletions