rox &/or viewnior cacheing?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
courtage
Posts: 55
Joined: Thu Jul 16, 2020 10:31 am
Location: Puppy user since 2006
Has thanked: 29 times
Been thanked: 4 times

rox &/or viewnior cacheing?

Post by courtage »

I have a bunch of directories with a variable number of image files in them, ranging from a few 10s to over 8k

I use viewnior to look at particular files in these dirs from time to time, and if it happens to be a directory with many files, viewnior takes a long time (maybe up to a minute) to open, but then if I access that directory again at a later date to view a different file, it will open instantly.

(I also have dirs with many large json files in and don't see the same issue when opening them with a text editor or jq or python or whatever)

So I'm guessing there is some cacheing going on that isn't kernel-related, but I can't seem to find where the cache is located.

Anyone know what's going on or how to speed viewnior up when accessing a large directory for the first time?

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: rox &/or viewnior cacheing?

Post by williams2 »

I'm guessing there is some cacheing going on that isn't kernel-related, but I can't seem to find where the cache is located

It is the kernel that creates and uses the cache space in ram.

When an an application executes, blocks of data from a block device are copied to buffers, and also to the cache space.

If you execute the application again, most of the blocks of data that the application uses will be in the cache space (in ram.) Getting data from the cache in ram is much faster than getting it from the hardware device (hard drive, flash drive, etc.)

For example:

Code: Select all

# cd /path/to/jpgs/dir/
# echo 3 > /proc/sys/vm/drop_caches
# time ls -l >/dev/null

real	0m49.029s
user	0m0.878s
sys	0m5.255s
# time ls -l >/dev/null

real	0m5.527s
user	0m0.467s
sys	0m2.076s
#

echo 3 > /proc/sys/vm/drop_caches clears the cache and buffers.

This shows that just listing the files in the dir took 49 seconds.
The second time listing the files took less than 6 seconds, because most of the blocks of data were in the cache in ram.

You could try ls or find the files before running viewnior

Configuring LD_PRELOAD might be useful.

See: https://wiki.archlinux.org/title/Preload

If you are accessing files on an NTFS file system. the NTFS driver is much slower than ext3 or ext4.

User avatar
666philb
Posts: 429
Joined: Thu Jul 09, 2020 3:18 pm
Location: wales uk
Has thanked: 111 times
Been thanked: 149 times

Re: rox &/or viewnior cacheing?

Post by 666philb »

hi @courtage ,

it's probably rox's thumbnails that are slowing you down.
you can turn them off by right clicking on an desktop icon >> ROX-Filer >> Options >> Thumbnails

Post Reply

Return to “Users”