Feedback on Files/Nautilus Performance on Zorin OS 17.2 Education

The first time that Nautilus opens up a folder with images and videos, it generates a thumbnail. This does consume some CPU cycles, not a whole lot, but it does add up the more files and the larger they are. This would explain why the first time you opened this folder it lagged, but then it shows normally.

Was this the case in your example? If yes, and you want to test further, you can remove all the cached thumbnails with the following script:

by @mcuda:

#!/bin/bash
tmp="${XDG_RUNTIME_DIR}/for_smart_rm"
mkdir $tmp
realpath $@ > "${tmp}/paths.txt"
readarray -t paths < "${tmp}/paths.txt"
i=0
for path in "${paths[@]}"
do
    echo -n "file://${path}" > "${tmp}/uri-${i}.txt"
    i=$(($i+1))
done
md5sum ${tmp}/uri*.txt > md5sums.txt
dir="${HOME}/.cache/thumbnails/normal"
awk_arg="OFS=\"/\" {print \"${dir}\",\$1}"
awk 'OFS="." {print $1,"png"}' < md5sums.txt | awk "${awk_arg}" > "${tmp}/thumbnails.txt"
readarray -t thumbnails < "${tmp}/thumbnails.txt"
rm ${thumbnails[*]}
rm -r $tmp

To use it, save it somewhere in your machine, and grant executable permissions. Then, run it providing all the files in the directory that you want to remove thumbnails from. E.g.: ./test.sh ~/Pictures/lots_of_pictures/*

NOTE: the original script is designed to remove the original images as well. I've removed the line that does that so that you don't end up losing your pictures, but suffice to say that you should really test this at your own risk. Make sure you have backups!

Some bedtime reading, in case you're curious: