It is currently May 20th, 2024, 10:24 am

A skin's CPU usage vs. thread count

Get help with creating, editing & fixing problems with skins
Posts: 3
Joined: June 12th, 2010, 11:38 pm

A skin's CPU usage vs. thread count

Post by BrainStabber »

I have been making changes to a copy of gnometer, and all of sudden Rainmeter uses a lot more CPU (~11% vs. 2-3%). However, the thread count that my skin uses is far less than Gnometer. What I want to understand is how Rainmeter utilizes the CPU and what determines the number of threads rainmeter creates. Understanding this will hopefully allow me to tailor my skins to decrease CPU usage.

Background info: To avoid conflicts between Gnometer and my modified theme (I'll refer to it as MyMeter), I copied and renamed all Gnometer files including any references to Gnometer within .ini files. I am currently using release candidate 1. According to Performance Monitor, Gnometer Preview theme was using 2-3% of the CPU, and a thread count at 9%. MyMeter used an average CPU usage at a minimum of 8% but reaching as much as 16% at sometimes. However, the average was typically around 11%. MyMeter had a thread count about 3-4%.

To see any particular skin was the problem, I began loading the skins one at a time starting with what I thought would be skins with a low demand and then adding more skins. No single skin caused a dramatic increase in CPU, instead it increased almost linearly.

I did not change the values of 'update' or 'update rate' for any skin. New variables were created, but no variables were deleted. Changes to variables were usually to colors of fonts, font effects, etc. I added a left-to-right gradients that differed for each sidebar, e.g. black on the outside edge which fades to white on the inside edge. This gradient was also applied to the thick line at the top of each skin. A new variable called SIDE was added to each skin and new styles were added to change the color scheme for a skin depending which side bar it is in, e.g. TitleStyleLeft and SIDE=Left with MeterStyle=TitleStyle#SIDE#.

If anything, I think MyMeter would increase both the thread count and the CPU usage. I don't know why the changes I have made would decrease the thread count. Any suggestions?

Sorry for the verbose message, but I figure it is better to give more information than less.
User avatar
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: A skin's CPU usage vs. thread count

Post by Chewtoy »

First of all: This is probably the best post I've seen in the help forum. Well documented and lots of info about the problem. WELL DONE!

As for your problems. They are strange indeed. Some simple name-changes should not be a reason to increase CPU-usage. I'm not all to familier with gradients, but that's the only thing I can think of that would cause this if that's the only thing that you added. So let's try to figure this out.

If you make a new fresh copy of gnometer, and just add the gradient, do you see the same increase in CPU?
Did you by any chanse have a update in your Anti-Virus while playing with rainmeter?
If you use the original Gnometer, is it still on the same low level?

Very strange problem indeed...
I don't think, therefore I'm not.