CEA script VS CEA load script?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
eil
Posts: 1932
Joined: 13 Jan 2011 19:44

CEA script VS CEA load script?

Post by eil »

When CEA come i already had some scripts in use, so i just added them with "load script". More small actions came and i was just pasting them in CEA directly. And lately i suddenly got a presumption: CEA-scripts are stored in main INI file, so they're ought to be loaded along the configuration during XY start and stay in memory whole session, while Load script will read file each time i call a function = so storing(at least small) scripts in CEA directly is much more productive.!
Am i right in my presumption?
-
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CEA script VS CEA load script?

Post by highend »

I don't think they stay in memory because of that (but Don needs to answer this)

I don't find this productive.

It's way easier to edit an external script (via a good editor with syntax highlighting, correct indentation, etc.^^) instead of going into CEA configuration details to edit small parts via just an "edit text" window...
One of my scripts helped you out? Please donate via Paypal

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

Re: CEA script VS CEA load script?

Post by admin »

They don't stay in memory.

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

Re: CEA script VS CEA load script?

Post by eil »

Is there a way to make scripts stay in memory to be read from there?(is there some method/place to put them in)
Small numbers make big numbers, and i don't like that simple script for opening fav menu(which is used 20-50 times per day) will be read from hdd each time.(especially as there are more tiny scripts like that) When it's some complicated and seldom used script i'm fine, but when it's smth small, yet making constant hardware operations - that worries me. :ninja:
p.s. Side question: so XY doesn't load whole INI on start and makes reads constantly during workflow?..
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: CEA script VS CEA load script?

Post by admin »

1) No way ATM.

2) No, INI is read on startup and never again.

Evolve
Posts: 354
Joined: 27 Feb 2020 09:48

Re: CEA script VS CEA load script?

Post by Evolve »

eil wrote: ↑19 Aug 2022 20:01 i don't like that simple script will be read from hdd each time... Is there a way to make scripts stay in memory to be read from there?
You can do it yourself (kind of) by moving XY folder into a RAM disk.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: CEA script VS CEA load script?

Post by highend »

Windows has a file cache. Those little things (if executed often enough) are already cached automatically...
One of my scripts helped you out? Please donate via Paypal

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

Re: CEA script VS CEA load script?

Post by eil »

admin wrote: ↑19 Aug 2022 20:36 2) No, INI is read on startup and never again.
Then what about scripts put directly in CEA fields - they are stored in INI so ought to be read along, isn't it?
Evolve wrote: ↑19 Aug 2022 22:34You can do it yourself (kind of) by moving XY folder into a RAM disk.
I was thinking about such solution too, but hope to find other way as don't have much RAM.
highend wrote: ↑19 Aug 2022 22:40 Windows has a file cache. Those little things (if executed often enough) are already cached automatically...
For pity one can't know if this works in particular case, so i'd prefer to be sure.
Win 7 SP1 x64 100% 1366x768|1900x1080

jupe
Posts: 3577
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: CEA script VS CEA load script?

Post by jupe »

You could use the fc flag of load, only beneficial if you use the same script repetitively though without any others in between.

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

Re: CEA script VS CEA load script?

Post by eil »

jupe wrote: ↑20 Aug 2022 02:36 You could use the fc flag of load, only beneficial if you use the same script repetitively though without any others in between.
Nah, different scripts used so it's not a solution.

Well basically it's all about IF scripts that are stored in XY INI loaded along with all settings on XY start.
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: CEA script VS CEA load script?

Post by admin »

eil wrote: ↑20 Aug 2022 22:08 Well basically it's all about IF scripts that are stored in XY INI loaded along with all settings on XY start.
They are.

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

Re: CEA script VS CEA load script?

Post by eil »

admin wrote: ↑21 Aug 2022 11:11
eil wrote: ↑20 Aug 2022 22:08 Well basically it's all about IF scripts that are stored in XY INI loaded along with all settings on XY start.
They are.
Thank you! So my theory is right and putting scripts directly in CEA is useful for less I/O stress on hardware.
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: CEA script VS CEA load script?

Post by admin »

Yep.

Post Reply