[Bug] Tvservice cpu usage increase problem while .ts playback fullscreen (19 Viewers)

Vasilich

Portal Pro
August 30, 2009
3,392
1,173
Germany, Mayence
Home Country
Russian Federation Russian Federation
georgius, have you ever switched to fullscreen TV? from your description isn't clear what is "MP main screen"
 

georgius

Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    georgius, have you ever switched to fullscreen TV? from your description isn't clear what is "MP main screen"
    I'm sorry, but I didn't mentioned it, I didn't switch MP to fullscreen. I can make same tests with MP switched to fullscreen. MP main screen is first screen with buttons (TV, Radio, ...), doesn't matter if fullscreen or not.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    georgius, have you ever switched to fullscreen TV? from your description isn't clear what is "MP main screen"
    I'm sorry, but I didn't mentioned it, I didn't switch MP to fullscreen. I can make same tests with MP switched to fullscreen. MP main screen is first screen with buttons (TV, Radio, ...), doesn't matter if fullscreen or not.

    The whole point of this bug is what happens to TV server CPU usage when TV on client is switched to fullscreen. :)

    Mark
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Sorry I can't test as my very limited facilities don't allow for compiling Mp etc.

    If someone can point me to good tutorial on this I can proceed over the weekend.

    I am looking through the patch forum for clues.

    OR if someone can upload the specific files (if possible!) for me to test.


    Attached is TvPlugin.dll with mod applied for 1.2.0 Beta - drop it into 'C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows'

    Tony
     

    Attachments

    • TvPlugin_dll_for_120Beta.zip
      172.6 KB

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    I was still getting the problem of the miniEPG and programInfo screens not showing the current channel info for first time they are opened after starting TV (the OSD was OK with the v2 patch), so I added 'TVHome.Navigator.CheckChannelChange();' in the relevant methods - patch attached (against current SVN).

    Tony
     

    Attachments

    • tvfullscreen_highcpu_fix_v3.patch
      3.2 KB

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    The whole point of this bug is what happens to TV server CPU usage when TV on client is switched to fullscreen. :)

    I was still getting the problem of the miniEPG and programInfo screens not showing the current channel info for first time they are opened after starting TV (the OSD was OK with the v2 patch), so I added 'TVHome.Navigator.CheckChannelChange();' in the relevant methods - patch attached (against current SVN).

    Tony

    OK, I'll make same tests on fullscreen, should I test with gibman's patch or with Owlsroost's patch?
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    I think I'd try the v2 patch first, then my v3 (just in case I've got it wrong - I don't know the code very well).

    Tony
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    Sorry I can't test as my very limited facilities don't allow for compiling Mp etc.

    If someone can point me to good tutorial on this I can proceed over the weekend.

    I am looking through the patch forum for clues.

    OR if someone can upload the specific files (if possible!) for me to test.


    Attached is TvPlugin.dll with mod applied for 1.2.0 Beta - drop it into 'C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows'

    Tony

    Thanks

    Downloaded and will test and feedback tomorrow at 11.30 ish.

    The whole point of this bug is what happens to TV server CPU usage when TV on client is switched to fullscreen. :)

    I was still getting the problem of the miniEPG and programInfo screens not showing the current channel info for first time they are opened after starting TV (the OSD was OK with the v2 patch), so I added 'TVHome.Navigator.CheckChannelChange();' in the relevant methods - patch attached (against current SVN).

    Tony

    OK, I'll make same tests on fullscreen, should I test with gibman's patch or with Owlsroost's patch?

    The test needs to involve the following conditions, allow at least 30 seconds in each screen to ensure cpu usage stabalises.

    1. Tv On (or TS file playback) in fullscreen, no OSD menus

    2. Tv ON (or TS file playback) in fullscreen OSD menu showing (except TOPBAR and bottom bar; these make no difference )

    3. Tv On (or TS file playback) within UI showing; any will do HOME, RECORDINGS, TV Guide etc

    The issue is that in 1. the TVSERVICE cpu usage increase dramaticaly (obviously depends on your total cpu power) with respect to 2. and 3. My increase is from about 4% to 25-30%

    Thanks
     

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    I made tests with no patch, with gibman's patch and with Owlsroost's patch. Testing procedure was:
    1. start TV service
    2. start performance monitoring
    3. start MP in fullscreen
    4. stay 30 seconds in MP main screen
    5. swicth to MP TV home screen
    6. stay 30 seconds in MP TV home screen
    7. started TV and switched to fullscreen (no menu, OSD, just pure video)
    8. watch 30 seconds
    9. show OSD (information in bottom part)
    10. wait 30 seconds
    11. show TV guide with TV in lower left corner
    12. wait 30 seconds
    13. stop TV
    14. stay 30 seconds in MP TV home screen
    15. switch to MP main screen
    16. stay 30 seconds in MP main screen
    17. close MP, stop TV service, stop performance monitoring

    Probably I didn't correctly understand what is OSD in SciDoctor's post. If you mean another window, please, specify it and I can retest again. From results you can see, that between gibman's patch and Owlsroost's patch aren't performance differencies (at least in my environment). I can confirm that both patches lowers CPU usage against not patched version of TV plugin. But both patches have still strange behaviour in MP TV home main screen (without playing TV). They both have higher CPU usage agains CPU usage while playing TV.
     

    Attachments

    • TestNoPatch.png
      TestNoPatch.png
      124 KB
    • TestPatchV2.png
      TestPatchV2.png
      119.6 KB
    • TestPatchV3.png
      TestPatchV3.png
      119.5 KB

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    Sorry I can't test as my very limited facilities don't allow for compiling Mp etc.

    If someone can point me to good tutorial on this I can proceed over the weekend.

    I am looking through the patch forum for clues.

    OR if someone can upload the specific files (if possible!) for me to test.


    Attached is TvPlugin.dll with mod applied for 1.2.0 Beta - drop it into 'C:\Program Files\Team MediaPortal\MediaPortal\plugins\Windows'

    Tony


    This has corrected the problem, there is no longer a substantial cpu increase in tvserver with cpu staying within 1-4% instead of peaking at 25-30%.

    The plus points are that now when system cpu approaches 100% for long periods ie epg grab/update the UI is smoother and responsive and the Heartbeat monitor is less likely to disconnect from the server.

    What this has highlighted though is that there seems to be some excessive polling in TVHOME when no video is playing, nothing as dramatic as the corrected bug but there is an increase in cpu usage from 1-3% to 9-11% for tvservice; this maybe a necessary working within TVHOME and not a bug. (I have noticed this for some time in 1.1.3 and some previous releases, it was a problem some years ago and reduced with a fix by tourettes if I remember)
     

    Users who are viewing this thread

    Top Bottom