Very slow to open 'Recorded Radio', instant on 'Recorded TV' (1 Viewer)

CyberSimian

Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    I was wondering if it would be possible to move/import all his older radio recordings to the video section of MP? I was thinking that this option would still give him access to his 'archive' recordings via videos, and would speed up access to recent recordings in recorded radio.
    This is exactly how I organise my radio and TV recordings. I have 2,400 radio recordings, 13,000 TV recordings, and 2,300 films :eek: :eek: :eek:.

    I use the "Recorded TV" and "Recorded Radio" folders to accumulate recordings during the week. Then, any recordings which I am not going to watch or listen to in the next seven days I move to a folder tree in the "Videos" section. The folder tree allows me to choose how I want to arrange the recordings. One of the things that annoyed me about WMC was that although you could specify multiple separate folders to store recordings, WMC insisted on "flattening" the folder trees and presenting them as a single level. Ugh! Sadly, MP's "Recorded TV" and "Recorded Radio" folders completely ignore nested folders, so you cannot create a folder tree there. :(

    One caution: in the "Videos" section:

    (1) The resume point for partially watched TV recordings is remembered.
    (2) The resume point for partially listened-to radio recordings is not remembered (playback will always start from the beginning).

    Your observation re the recording cleanup process would definitely make sense as the cause of the delay when accessing recorded radio. I take it that this function is hard-coded into MePo and there is no way to bypass it when entering recorded radio? I'm unclear as to why this is triggered on radio but not on tv.
    Unfortunately, hardly anyone records radio from DVB-T. So radio is treated as the ugly sister that no one wants to take to the party, and keeps getting left behind when enhancements are made to the staggeringly attractive TV sister.

    In this case, an action was added to the "Recorded TV" panel so that users can manually clean-up dead entries in the database. (If you use the "DefaultWide" skin, press LEFT on the "Recorded TV" panel to get to the left side-bar; one of the selections there is "Clean Up".) This "Clean Up" action was not added to the "Recorded Radio" panel. :( So with TV you never get clean-up by default, but with radio you always get clean-up by default.

    -- from CyberSimian in the UK
     

    Andy Ford

    Portal Member
    February 28, 2012
    35
    16
    58
    Home Country
    Great Britain (UK) Great Britain (UK)
    Wow, that IS an archive! Thanks so much for your reply CyberSimian, it has perfectly answered my questions and given me some great insight into MP history :)
    It's really re-assuring to know that it is possible to integrate/manage such a large library within MP.

    I will try this on my own system first, where I have a lot less radio files to deal with :)

    Once again thanks so much for your help.

    Andy
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I take it that this function is hard-coded into MePo and there is no way to bypass it when entering recorded radio?
    Correct.

    I'm unclear as to why this is triggered on radio but not on tv.
    There's probably some truth in CyberSimian's comment about the treatment of the radio section in comparison to TV. It isn't intentional. However there is a clean up function in recorded radio:
    upload_2016-8-4_11-12-2.png


    I just tried disabling the AV altogether and the delay remains around 20 seconds, so it would suggest that it's the sheer volume of files involved in the cleanup process that is causing the delay.
    Indeed. You could confirm this by running cleanup manually and observing how long it takes.

    Regarding your suggestion to check appropriate indexes on the TV Server database recording table. I am not familiar with databases at all, and am unsure exactly what that means. Could you please clarify or point me in direction where I can learn more?
    If you're completely unfamiliar with databases then this may read like gobbledy gook:
    http://www.w3schools.com/sql/sql_create_index.asp

    In this setup does the recoding cleanup only scan the folders containing radio recordings during access to the recorded radio window, or does it also scan the seperate folders containing tv recordings?
    Yes, it does. As per my previous reply: cleanup in both TV and radio sections always scans all recordings. When I say "all" I mean both TV and radio. Cleanup within a section is not limited to the type of recordings associated with the section.

    I just want to say how grateful I am that you came back to me so quickly again with helpful information. It makes me really appreciate the MePo community.
    You're very welcome, any time. :)
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    However there is a clean up function in recorded radio
    Well, I never knew that! Thank you for bringing it to my attention, and correcting my previous incorrect statement. However...

    If "Recorded Radio" has a "Clean Up" choice in the left side bar, why does it (apparently) always clean-up the recordings on entry to "Recorded Radio" (assuming that this hypothesis is correct)? This makes the "Clean Up" choice in "Recorded Radio" somewhat superfluous. o_O Or are you suggesting that this was an oversight, and now represents a bug in MP (the automatic clean-up should have been removed when the user-initiated clean-up was added)?

    -- from CyberSimian in the UK
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    If "Recorded Radio" has a "Clean Up" choice in the left side bar, why does it (apparently) always clean-up the recordings on entry to "Recorded Radio" (assuming that this hypothesis is correct)?
    Yes that hypothesis is correct... and the reason is as you previously described: unbalanced treatment of the radio and TV sections.

    This makes the "Clean Up" choice in "Recorded Radio" somewhat superfluous. o_O
    Not at all. How else would you easily delete watched recordings?

    Or are you suggesting that this was an oversight...?
    Yes, as above.

    ...and now represents a bug in MP (the automatic clean-up should have been removed when the user-initiated clean-up was added)?
    No I don't think it's a bug. Confused yet? :D

    First, the user-initiated clean up function in both TV and radio has existed for a long time. It wasn't added when the automatic cleanup function was "removed".

    Automatic cleanup was disabled for TV to appease people that keep recordings on NAS that is not always online. What would happen is that when they entered recording sections with their NAS offline, TV Server would not be able to find their recording files and so would automatically delete the recordings from the database.

    In my opinion the "fix" that was applied is awful. It's inconsistent between TV and radio as you've seen. I also think it's poorly thought out. A more appropriate fix would've been to simply check if the NAS/share is online before proceeding. If it is, fine and carry on; if not, don't proceed. That would have satisfied both the NAS owners and the folks who complained that invalid - usually deleted manually via Windows Explorer, or moved due to post-processing - recordings were no longer being cleaned up for them automatically.

    [edit: In case it wasn't clear, I think the fix applied to the TV section is a bug. It ought to be rolled back and dealt with properly for both radio and TV.]

    <sigh>

    Anyhow as you know TV Server is under code freeze, so in the short term I don't foresee any code changes in TVE 3 to improve the situation. From I TVE 3.5 perspective, thanks to Andy I've ensured that the thumbnailer won't attempt to create thumbnails for radio recordings. That was a one-liner. I currently don't have the "bandwidth" to deal with the other things discussed above.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    This makes the "Clean Up" choice in "Recorded Radio" somewhat superfluous. o_O

    Not at all. How else would you easily delete watched recordings?
    This reflects different styles of use, I think. I am a "watch and delete" kind of user, so I always explicitly delete a recording when I have finished watching it.

    Sometimes I stop watching part-way through. Because of that, I would never use the "Delete watched recordings" choice under "Clean Up", because of the risk that it would delete recordings that I had not finished watching. The recordings change colour in the list, and acquire the tick mark, so I assume that this means that they are eligible for deletion, even though I might have watched less than half of the recording.

    Be that as it may, I can appreciate that others may use MP differently, and find "Delete watched recordings" a useful choice.

    Automatic cleanup was disabled for TV to appease people that keep recordings on NAS that is not always online.
    I agree that this was a needed change. I was always annoyed with WMC because that did the same thing (at that time the bulk of my recordings library was on USB disks that were not always powered up when running WMC).

    A more appropriate fix would've been to simply check if the NAS/share is online before proceeding. If it is, fine and carry on; if not, don't proceed.
    Yes, I agree with this. (y)

    -- from CyberSimian in the UK
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    A more appropriate fix would've been to simply check if the NAS/share is online before proceeding. If it is, fine and carry on; if not, don't proceed.
    Yes, I agree with this. (y)
    Hmm, perhaps I don't agree with this. :(

    Originally Andy's delay on entering "Recorded Radio" was circa 45 seconds, but only part of that was due to thumbnail generation. After he had manually created the thumbnails, the delay was reduced, but it was still 20 seconds. If reconciliation between the database and the NAS is always done on entry to "Recorded Radio" and "Recorded TV", there would be a delay of 20 seconds every time. The problem is the speed of reconciliation when the recordings library is large.

    When I used WMC on Vista (here we go again!), I became impatient when display or redisplay of the "Recorded TV" panel took longer than one second. Vista had a poor design in this area, which meant that the limit for me was about 100 recordings in the "Recorded TV" folder; more than that would cause Vista to take too long rebuilding the screen (more than one second). :(

    -- from CyberSimian in the UK
     

    Andy Ford

    Portal Member
    February 28, 2012
    35
    16
    58
    Home Country
    Great Britain (UK) Great Britain (UK)
    Thank you mm1352000 for your clarifications :)

    I tried running cleanup manually within recorded radio and it is exactly the same 20 seconds to complete process.

    Thanks for the link re database. This is one area of IT where I am a complete beginner, so it may be a while before I understand, but I am going to learn.

    I've now moved radio recordings from the previous 4 years, into the videos section of MP. The delay when entering recorded radio is now down to 10 seconds :)

    Now I know the cause of delay, I can discuss with my friend the available options.

    He really wanted all his recorded tv in one big 'pool', so he will have to decide if he can put up with slight delay or he could use videos/tv-series paths for his older recordings to lessen load on cleanup process. He already moves recorded tv movies to seperate folder accessed by moving pictures. I had previously configured his system with tv-series plugin, so 80% of the recordings were not in the recorded tv folder, which explains why I didn't see radio delay previously.

    A big thank you to both contributors to my questions. Your replies have completely answered all I needed to know, and it's interesting to get some more understanding of exactly how MP functions.

    Please pass on my thanks and admiration to all involved in MP, for an incredible piece of software. The picture/sound quality acheivable is superb and it's such a more complete peice of sofware than WMC ever was :D

    Andy
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    The problem is the speed of reconciliation when the recordings library is large.
    It's trivial to change the task from synchronous to asynchronous.
    synchronous = trigger open section -> trigger start task -> ...wait for task to complete... -> task completes -> finish section load
    asynchronous = trigger open section -> trigger start task -> finish section load -> task completes (-> [optional] refresh section)
     

    Andy Ford

    Portal Member
    February 28, 2012
    35
    16
    58
    Home Country
    Great Britain (UK) Great Britain (UK)
    asynchronous = trigger open section -> trigger start task -> finish section load -> task completes (-> [optional] refresh section)
    That sounds like good option, and sounds like it would avoid the situation I had when stopping live tv after previously in recorded radio section. The tv image froze until the cleanup had finished and then jumped back to radio section.
     

    Users who are viewing this thread

    Top Bottom