Hello, I was wondering how Rainmeter handles variables.
My question is as follows:
I have 10 skins.
In each skin's .ini file I have a variable X=1.
If I put those 10 variables into one .inc file instead of adding them locally in every skin, would that reserve less RAM or wouldn't it make a difference? (don't stick on whether the size reserved in the RAM is too small or not, I just wanna know what happens.)
It is currently April 26th, 2024, 1:44 pm
How stuff works. (RAM handling)
-
- Posts: 919
- Joined: January 30th, 2017, 2:01 am
- Location: Greece
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: How stuff works. (RAM handling)
It wouldn't make any difference. Loading a .inc file in a skin is exactly the same as if the code in the .inc file was in the skin .ini file itself, and everything in the .inc file is distinctly loaded and treated locally by the skin. There in nothing that is "shared" between skins.kyriakos876 wrote:Hello, I was wondering how Rainmeter handles variables.
My question is as follows:
I have 10 skins.
In each skin's .ini file I have a variable X=1.
If I put those 10 variables into one .inc file instead of adding them locally in every skin, would that reserve less RAM or wouldn't it make a difference? (don't stick on whether the size reserved in the RAM is too small or not, I just wanna know what happens.)
The entire point of @Include is not about "sharing" anything between skins, but having a single place where you can "change" something, that is then distinctly used by various skins. So while it is tempting, and in fact common, to think of @Include as a way to "share" variables or other code between skins, it's more like a single common place to keep and change something, so that when various skins use it, they all are getting the same thing.
-
- Posts: 919
- Joined: January 30th, 2017, 2:01 am
- Location: Greece
Re: How stuff works. (RAM handling)
Interesting... Thanks for sharing your knowledge once again
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: How stuff works. (RAM handling)
Glad to help. The entire concept of "global" in the programming sense, does not exist anywhere in Rainmeter.