NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 11 12 13 14 15 93 Next »
More "efficient" redraw?

 
  • 0 Vote(s) - 0 Average
More "efficient" redraw?
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#1
2011-12-29, 06:12 PM
I just got a power usage meter as a gift and now, of course, am scrutinizing all my electronics to death Smile. In any case, when in my MusicMonkey plugin and showing the (static) list of songs in Now Playing my PC uses ~19W. When I go into the MusicMonkey screensaver where it forces an update/redraw every second for the elapsed time, it jumps to ~37W which is pretty much the same usage when watching HD video. When I am using the built-in "FixedImage" NPVR screensaver, every time the image moves the usage temporarily jumps to ~30W and then goes back down.

Is there any conceivable way to improve the redraw "efficiency" or is it just the way it is? Note that in the MusicMonkey screensaver the CPU usage only goes up a few percent from when viewing the Now Playing list (~6% versus ~3%).
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#2
2011-12-29, 06:39 PM
I dont really understand the scenario you're trying to decribe.

As a guess - it sounds like either your screensaver, or the screen behind it, are return 'true' from NeedsRendering() causing it to continually redraw the screen
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,917
Threads: 956
Joined: May 2006
#3
2011-12-29, 06:42 PM
What I did in MusicBox4 to reduce CPU (now I have to get the power meter from the library).

Code:
if (PluginHelperFactory.GetPluginHelper().ScreenSaverIsActive() || PluginHelperFactory.GetPluginHelper().GetActivePopup() != null)
            {
                return false;
            }

I had a Thread.Sleep() in there too, but sub doesn't recommend them. I have them in WebRadio and it hasn't caused me a problem.

Martin
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#4
2011-12-29, 07:06 PM (This post was last modified: 2011-12-29, 07:11 PM by cncb.)
My question is if there is a way to do a redraw that would not cause such a jump in power usage when it is performed. My "screensaver" has to redraw every second to update the displayed time elapsed text and "progress bar" so there is no avoiding the redraws. I guess it is not possible but I thought I would ask anyways. I will have to see what happens with the "animated" screens in Windows Media Center - the higher power usage may just be unavoidable.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#5
2011-12-29, 07:17 PM
Are you sure it's drawing what you think it is drawing? I wouldnt expect updating one image and one bit of text every second to cause much CPU usage. I think its more likely you're missing something else that is happening.

I'd put a log message in GetRenderList() for you plugin and your screen saver, to see if it's being called more often than you expect (because of issue with NeedsRendering()). I suspect you'll see it being rendered much more than the once per second you were expecting.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,917
Threads: 956
Joined: May 2006
#6
2011-12-29, 07:18 PM
Again on MB4 I optimize my renderlist for playback on the NMT so unless the album changes I only re-render the timebar and hh:mmConfuseds element, which is also updated each second. I reserved a kill-a-watt at the library and will pick it up today or tomorrow and let you know if I see the same spikes, you got me curious.

Martin
stustunz
Offline

Posting Freak

Posts: 5,111
Threads: 112
Joined: Oct 2006
#7
2011-12-29, 07:23 PM
here i was thinking you had your own library Martin Smile
[SIZE="1"]Specs[/SIZE]
[SIZE="1"]Server:Cpu-Intel i3,ATI Radeon HD 5670 ,OS-Windows 7,2gig ram. 2xHvr4400,Nova-s plus(dvb-s SD),hvr2210(dvb-t HD)[/SIZE]
[SIZE="1"]Client:Cpu-AMD am2,Gpu-Ati HD2100 integrated ,OS-Windows 7,2gig ram[/SIZE]
[SIZE="1"]Client:Cpu Intel 2 gig ram ,Nvidia 9400[/SIZE]
[SIZE="1"]ClientTongueopcorn Hour A110[/SIZE]
[SIZE="1"]Client:Samsung [NZ][DVB-s][2012]BD-E5900x2 [/SIZE]
[SIZE="1"]Client:Samsung [NZ][DVB-s][2013]BD-F6500 [/SIZE]
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#8
2011-12-29, 07:24 PM
mvallevand Wrote:Again on MB4 I optimize my renderlist for playback on the NMT so unless the album changes I only re-render the timebar and hh:mmConfuseds element, which is also updated each second.

How do you re-render just a few elements instead of all of them? Do you return some kind of selective list in GetRenderList()?
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#9
2011-12-29, 07:28 PM
sub Wrote:I wouldnt expect updating one image and one bit of text every second to cause much CPU usage. I think its more likely you're missing something else that is happening.

Well, as I said the built-in NPVR screensaver causes a temporary power spike when it moves the fixed image around so I imagine if it did this every second instead of every several seconds I would see the same constant extra power usage.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#10
2011-12-29, 07:32 PM
GetRenderList() will always return all the elements. Martin is just saying he's not causing items in that renderer list to be re-rendered unless they really need to be. ie unchanged items that where renderered earlier are still returned in the list. By "rendered" I'm referring to the bitmaps being redrawn (rather than the act of being displayed on the screen).

I'd look at my reply above though. I'm pretty sure your NeedsRendering() in the screen saver or the plugin below it is at fault.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to force redraw? Wakalaka 3 1,700 2007-03-27, 09:58 AM
Last Post: psycik

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode