Skip to content
Commit e713c90c authored by Tomaz  Canabrava's avatar Tomaz Canabrava Committed by Kurt Hindenburg
Browse 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.
parent 0b489b0c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment