So i took soita skin for media players and did a little editing, i noticed the progress bar could not be clicked to seek around the song, so i created 50 buttons spaced evenly through the progress bar that allows me to skip, all this works but i have noticed my cpu usage is much higher. Since these buttons are invisible (right over the progress bar), is there a way to make update not refresh the 50 buttons every second?
or is it just a coincidence that its taking more cpu o-o
It is currently May 2nd, 2024, 6:02 pm
Update Rate With Large Amount of Buttons
-
- Posts: 5
- Joined: January 22nd, 2012, 5:15 am
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Update Rate With Large Amount of Buttons
Can you show the code for a single button?
-
- Posts: 5
- Joined: January 22nd, 2012, 5:15 am
Re: Update Rate With Large Amount of Buttons
[0]
Meter=BUTTON
ButtonImage=Seek.png
X=25
Y=98
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetProgress 0"]
[2]
Meter=BUTTON
ButtonImage=Seek.png
X=5r
Y=98
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetProgress 2"]
0 to 100, intervals of 2 Seek.png is a transparent image about 10 pixels wide (i originally had it at 5, but somehow it was too small)
bar length is 250, so 250/5 = 50 buttons
also, was there a better way to do this type of seek? (instead of 50 buttons)
it might just be my outdated computer =/
Meter=BUTTON
ButtonImage=Seek.png
X=25
Y=98
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetProgress 0"]
[2]
Meter=BUTTON
ButtonImage=Seek.png
X=5r
Y=98
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetProgress 2"]
0 to 100, intervals of 2 Seek.png is a transparent image about 10 pixels wide (i originally had it at 5, but somehow it was too small)
bar length is 250, so 250/5 = 50 buttons
also, was there a better way to do this type of seek? (instead of 50 buttons)
it might just be my outdated computer =/
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Update Rate With Large Amount of Buttons
Poiru may have other thoughts, but I created a test skin with 100 buttons following the example you gave, and it seems to work fine for me without any significant CPU usage.
Do you perhaps have your Update= in [Rainmeter] set really low? I set mine to Update=200 and with the 100 buttons I see no significant increase in CPU usage.
Do you perhaps have your Update= in [Rainmeter] set really low? I set mine to Update=200 and with the 100 buttons I see no significant increase in CPU usage.
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Update Rate With Large Amount of Buttons
Could you try with IMAGE? E.g.:cleeezzz wrote:also, was there a better way to do this type of seek? (instead of 50 buttons)
it might just be my outdated computer =/
Code: Select all
[0]
Meter=IMAGE
SolidColor=0,0,0,1
X=25
Y=98
W=3
H=10
LeftMouseUpAction=!Execute [!RainmeterPluginBang "mPlayer SetProgress 0"]
-
- Posts: 5
- Joined: January 22nd, 2012, 5:15 am
Re: Update Rate With Large Amount of Buttons
i left it at 1000ms, i guess its just my computer then
is there a difference between image and button?
is there a difference between image and button?
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Update Rate With Large Amount of Buttons
I'd be interested to see what you get if you run that .rmskin I posted and see if my skin creates any CPU issues for you. Since it is "just" the buttons and no other functionality, if it works better for you it might mean we should look elsewhere in your skin to see if something else is having an impact.
As to Image vs. Button in this case, using Meter=Image and SolidColor instead of a "button" is almost certainly going to work at least a tad better as Rainmeter doesn't have to evaluate the button image and divide it in three to show the "over/off/click" states of the button, and in any case doesn't have to load and manage an image file. Since you are just using a "transparent" button, there is no advantage to it over an Image meter as you don't need or want the "states".
As to Image vs. Button in this case, using Meter=Image and SolidColor instead of a "button" is almost certainly going to work at least a tad better as Rainmeter doesn't have to evaluate the button image and divide it in three to show the "over/off/click" states of the button, and in any case doesn't have to load and manage an image file. Since you are just using a "transparent" button, there is no advantage to it over an Image meter as you don't need or want the "states".
-
- Posts: 5
- Joined: January 22nd, 2012, 5:15 am
Re: Update Rate With Large Amount of Buttons
i changed it to image, it seems to be a little better, thanks