TV SERVER CPU USAGE too high. (1 Viewer)

Broceliande

Retired Team Member
  • Premium Supporter
  • April 26, 2006
    186
    2
    Thanks for that gibman , we are just trying your timers fix atm, however , regarding to some other timers , i set the main one to 500 ms , so twice per second.
    The progressbar timer issue you spotted is a real one , indeed , minvalue must be an error due to VS code completion imo.
    As soon as it's fully tested , your changes will be in svn and in changelog.
    Broce
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Usa
    Home Country
    Ethiopia Ethiopia
    Broceliande ;
    No problem - It's great to be able to actually help out the project.
    What is your anwer towards my question about even calling -->

    "TVHome.UpdateProgressPercentageBar()"
    ... in the process method ?

    I would like to have something like;

    If (OsdVisible) TVHome.UpdateProgressPercentageBar().

    Or will this have any side effects ?
    The good thing about it is that the progress bar is only updated when the OSD is actually being shown

    :D

    /Gibman
     

    Broceliande

    Retired Team Member
  • Premium Supporter
  • April 26, 2006
    186
    2
    afaik it should work indeed, i don't see any possible side effect, as soon as osd is displayed ....
    i'll test that asap
    Timer fixes are in svn already
    Will be nice if you can test them , maybe i didn't add them exactly as you did , but should act the same anyway. Iloop reported me some decent cpu load values
    Maybe we need to finetune these timers though
    But haven't much time for testing , 1000 ms sounds too long to me , because many timers are around this value , can make some lagging side effects or so .
    I set it to 500 ms , but maybe 800 would be a good value .
    Lemme know if you compare the results between several values , keeping in mind that you must stay under 1000 ms imo.
     

    Broceliande

    Retired Team Member
  • Premium Supporter
  • April 26, 2006
    186
    2
    @Broceliande ;
    No problem - It's great to be able to actually help out the project.
    What is your anwer towards my question about even calling -->

    "TVHome.UpdateProgressPercentageBar()"
    ... in the process method ?

    I would like to have something like;

    If (OsdVisible) TVHome.UpdateProgressPercentageBar().

    Or will this have any side effects ?
    The good thing about it is that the progress bar is only updated when the OSD is actually being shown

    :D

    /Gibman


    From what i could find in the code we have that already
    if ((_statusVisible || _stepSeekVisible || (!_isOsdVisible && g_Player.Speed != 1) || (!_isOsdVisible && g_Player.Paused)))
    {
    TVHome.UpdateProgressPercentageBar();
    }
    The trouble is that it's also called directly in the process() method's beginning, so i just removed this direct call and let the contionnal one in place , also set the timer to 800 ms , regarding the others it should be enough .
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Usa
    Home Country
    Ethiopia Ethiopia
    Yes you're right. That one call seems misplaced indeed.

    And please folks - do let us know your findings when you test the latest SVN regarding CPU usage on the server.

    Also to go completely off topic here.
    Is there a todo list of some kind that contains features that could improve MP in general - something for the casual programmer like me to throw myself over.
    Maybe it would be a good idea to have one on the forum somewhere.
    (I know about mantis.)

    It always takes hours when going through code, so if I was to do something useful besides killing the obvious bugs here and there it would be useful to know if a certain feature is wished for or not - it would suck to waste my time implementing something that only I wished for.

    Ex. when toggleing the "change aspect ratio" on my remote the screen changes aspect ratio at once. It would be a lot nicer if it just stated the current aspect ratio and while the OSD is still rendered the next aspect ration button hit would issue the next aspect ratio in the list.

    Also tiresome that the myvideos plugin does not remember the last selected "sort" category...name, date size etc.
    when u restart MP the sort property is back to name again.

    I could go on :)

    /Gibman
     

    Broceliande

    Retired Team Member
  • Premium Supporter
  • April 26, 2006
    186
    2
    This sounds like a membership request , hehe ;)
    In case you'd better try to reach us on irc to have a "live" discussion .
     

    Users who are viewing this thread

    Top Bottom