Cache icons used by scripts in RAM.

Features wanted...
Post Reply
eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Cache icons used by scripts in RAM.

Post by eil »

Since there was quite a number of new stuff around the icons, i wanna toss my wish in a roster. I'm very concerned about I/O operations and really like good use of "buffered/prepared" features. As i understand XY Custom Icons are read only once on XY start, same goes for the icons used for Custom Buttons and Catalog, meanwhile scripts read icons each time script is used.
In past i already proposed an ability, that no other file manager possesses = a way to [url-viewtopic.php?t=25458]use base64 encoded icons[/url](which is a text) in scripts, so icons would be embedded in the script's body. Well maybe that would wait for the future, but how about an option to actually cache icons used by scripts in RAM? So if user the uses a script with icons, those stay in memory cached to the end of XY session, and next time the script is used, icons get read from there. Not only this would make less real reads from the hard memory, it will add some speed for big menus with icons.

Real life example. I use the script that collects most used apps from any place on the PC, and saves them as paper folders(basically a list with exe paths). Yet i have another script, that uses those paper folders to convert them into the menus = pretty easy to copy each line 3 times and format, so there be icon|name|path. BUT those scripted menus grow with time, and sometimes items in list are really from the very different locations, so each run of such menu makes say ~30 reads from all over the system just to get the icons, and only one item would be run, which makes all other reads kinda a waste, Plus when those menus get called some dozens, if not hundreds, times per day, that really is a huge number of wasted reads just for icons.
For the moment i'm trying to simply use menus without icons, which is pretty not comfortable, but if XY learns how to make one read on first script launch, and keep icons cached in Ram = that would really make icons use in menus more desirable!

I understand most users don't care about their hardware and excessive/useless operations, but XY is a Pro app and has lots of stuff for people that Do care. :ugeek:
Win 7 SP1 x64 100% 1366x768|1900x1080

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Cache icons used by scripts in RAM.

Post by admin »

I would not worry so much. Windows itself has a good I/O cache and repeated disk reads are always handled by RAM.

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: Cache icons used by scripts in RAM.

Post by eil »

Your words led to peculiar experiments and "frightening" results.
Exp.1: location with EXEs and ICOs = XY makes a read on first visit and doesn't make extra reads(if i'm correct even if tab was closed and later location visited in new tab - no re-read).
Exp.2: location with lots of LNK files leading to EXEs = EACH time tab/location is visited ALL the files are re-read(even if it's mere switch between tabs).
Exp.3: a paper folder that has EXEs and LNKs = exes are read only on first visit, lnks are re-read EACH visit.

Accidentally Exp.4 happened: if there are tabs with icons set, EVERY switch of tab forces re-read of icons!!(that's hundreds of re-reads per each hour with only couple icons set!)
And just to be sure i visited that location with LNKs(from Exp.2) at least 50 times in short term, additionally that was tab change event, so each time re-read tabs icons = even after 50 occasions read events were still happening, so i have much doubts about reliability of Win caching... For EXEs as executables, seems like yeah, for faster starting apps are prefetched, but resources like icons doesn't seem to bother MS at all.

BTW, strange but i couldn't catch an event of reading icons for scripted menu at all.. weird. Still now i'm really scared of LNK and will stop using them at all, yet no more icons on tabs(shame). So i still would wish XY had own reliable system of caching for visual resources, like it already does for mentioned Catalog, CFI, even paper folders unexpectedly appear to be i/o-frienfly.!
Win 7 SP1 x64 100% 1366x768|1900x1080

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Cache icons used by scripts in RAM.

Post by admin »

How do you determine a "read"? How will you know that it is a physical disk operation (I assume that's what you are worried about)?

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: Cache icons used by scripts in RAM.

Post by eil »

I used apps that catch these actions: read, create, delete, modify(like Sysinternals ProcMonitor and lots of similar). Considering if maybe those apps can lie about catching only/exactly physical reads - the results of experiments above prove it = when in one location + set of resources it's one read and no more, in other it's constant reads under same circumstances. If there'd be some "non-physical reads included" in results, either first situation would have more reads(so to say virtual ones added), or second must have stopped reporting reads('cause no more physical, all gone to virtual).
Win 7 SP1 x64 100% 1366x768|1900x1080

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Cache icons used by scripts in RAM.

Post by admin »

I have no reason to distrust Windows caching. And I wouldn't worry too much about those "disk reads"; after all, worrying means reading stress hormones into your blood.

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: Cache icons used by scripts in RAM.

Post by eil »

Soo as i understand no caching for icons feature?.. :cry: After all XY already does that, but for some situations, so adding whole-out support would be neat.
Win 7 SP1 x64 100% 1366x768|1900x1080

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: Cache icons used by scripts in RAM.

Post by eil »

So, Don, caching option is sure No, or Maybe but not now?
Win 7 SP1 x64 100% 1366x768|1900x1080

admin
Site Admin
Posts: 66094
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Cache icons used by scripts in RAM.

Post by admin »

I won't cache them because Windows does already. Let's stop this now. The thread is dead. :)

Post Reply