How stuff works. (RAM handling)

General topics related to Rainmeter.
User avatar

How stuff works. (RAM handling)

September 7th, 2018, 4:03 pm
kyriakos876
   [521 posts]

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.)
User avatar

Re: How stuff works. (RAM handling)

September 7th, 2018, 4:08 pm
jsmorley
Developer   [17961 posts]

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.)


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.

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.
User avatar

Re: How stuff works. (RAM handling)

September 7th, 2018, 4:22 pm
kyriakos876
   [521 posts]

Interesting... Thanks for sharing your knowledge once again :D
User avatar

Re: How stuff works. (RAM handling)

September 7th, 2018, 4:30 pm
jsmorley
Developer   [17961 posts]

Glad to help. The entire concept of "global" in the programming sense, does not exist anywhere in Rainmeter.

Return to “General Discussion”



Who is online

Users browsing this forum: CommonCrawler [Bot] and 0 guests