Rework of Music Database Thumb Handling (1 Viewer)

hwahrmann

Development Group
  • Team MediaPortal
  • September 15, 2004
    4,633
    2,457
    Vienna, Austria
    Home Country
    Austria Austria
    • Thread starter
    • Moderator
    • #42
    I've got the same figures.
    Was using DotTrace to debug.

    When i start MP and navigate to a folder with 800 mp3 files, it takes around 15 seconds, where the TagReader part takes around 11,5 seconds.
    Entering the folder a seond time or even after restarting MP, the task, which took previously 11,5 seconds is 125 ms.
    I fear this is Windows caching files.

    I can see something similar doing a Database Scan via Config.

    The first run over 3800 music files takes nearly 3 minutes.
    Subsequent runs finish in < 3 seconds.

    I don't think we can do something programmatic here.
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,633
    2,457
    Vienna, Austria
    Home Country
    Austria Austria
    • Thread starter
    • Moderator
    • #43
    Folder contains 955 files.

    After reboot:

    Code:
    [2014-12-22 20:33:25,763] [Log    ] [4        ] [DEBUG] - Folder: D:\Music\Top 100 : took : 12,1244329 s to load

    Subsequent access to folder:

    Code:
    [2014-12-22 20:38:56,272] [Log    ] [4        ] [DEBUG] - Folder: D:\Music\Top 100 : took : 0,5124895 s to load
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,633
    2,457
    Vienna, Austria
    Home Country
    Austria Austria
    • Thread starter
    • Moderator
    • #44
    An easy way to try.
    Get RamMap from Sysinternals.
    upload_2014-12-22_21-58-50.png


    Select Mapped File and then select "Empty -> Empty Standby List"

    Then press "F5" for Refresh:

    upload_2014-12-22_22-1-2.png


    If you now Select the folder again, you will experience the same tiome as after reboot
     

    edterbak

    Portal Pro
    March 4, 2008
    2,114
    1,176
    Home Country
    Netherlands Netherlands
    So if this is a windows thing, do you think you could try a way around with a logic to first trying to find matching from database? Or some other alternative faster way with the same result in mind which doesn't take so much from the system. Updating DB is done periodically (on my system) anyway, so if this works there should not be THAT much files left to be handled with this seemingly time/resource consuming method?
    Sebastiii did something similar a while back.... I think it was for 1.9, but I'm unsure.
    Come to think of it, currently with MP 1.9 doesn't show this delay. So there must be something different making it faster, or things NOT being done which should be done. :) Well, I'm just thinking out loud here.
     

    edterbak

    Portal Pro
    March 4, 2008
    2,114
    1,176
    Home Country
    Netherlands Netherlands
    I can accept the delay being caused by windows itself as a fact. Seems like a good enough reason :) Windows needs doing X, which takes Y amount of time. But this leaves me with a bit of an unsatisfied feeling with the next question.
    Q - What is the exact reason this delay is not observed prior to the rework?
    Were things (<rework) simply not done as they should have, like doing halve the job takes half the amount of time. Or is there some other reason? What is the difference.

    Thank you for digging at least so far already. Appreciated. :)
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,633
    2,457
    Vienna, Austria
    Home Country
    Austria Austria
    • Thread starter
    • Moderator
    • #48
    Q - What is the exact reason this delay is not observed prior to the rework?

    Prior to rework, we were doing a directory listing, and looking up a corresponding thumb in Thumbs folder.
    Now i need to read every single file with taglib-.sharp and extract the Picture.
     

    hwahrmann

    Development Group
  • Team MediaPortal
  • September 15, 2004
    4,633
    2,457
    Vienna, Austria
    Home Country
    Austria Austria
    • Thread starter
    • Moderator
    • #49
    So if this is a windows thing, do you think you could try a way around with a logic to first trying to find matching from database?

    If you select a database view, you won't experience this anyhow.
    Only thing, where you would get this, if you have an artist with a lot of songs, e.g. "Rolling Stones" and every single song is tagged with the same Album Name.

    But usually a Database View will return between 10 - 20 songs and that shouldn't cause any problem.
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    @hwahrmann i'm wondering if i'm doing something wrong, or if there is an issue with the Database view.

    I've got an Album which exists of 7 CDs. Folder structure is like this:
    \\Music Share
    -| Ray Charles
    --| Pure Genius - The Complete Atlantic Recordings 1952-1959 (2005)
    ---| CD1
    ---| CD2
    ---| CD3
    ---| CD4
    ---| CD5
    ---| CD6
    ---| CD7

    The root folder of the album has a generic folder.jpg for the album.

    Then did the following steps:
    1. Removed music database
    2. checked tags for the Album (7 CDs all tagged with their own cover)
    3. cleared Music thumbs
    4. ran dB import ('cover art embedded in ID3-Tags' checked)
    1 thumb is created in my \thumbs\Music\Albums folder, which has the cover of the first CD, and all CDs in GUI show the same cover (View by: Album Artists). Browsing the individual tracks of a CD does show the correct cover!

    When i also enable 'create missing folder.jpg' then the folder.jpg created in each CD folder has the correct cover. (y)
    Then in MP GUI i select Shares view, and then i have an album cover for the album, and different covers for the CDs, but this only works in Shares view, not in database (AlbumArtists) view.

    Am i doing something wrong or is this supposed to work like this?
     
    Last edited:

    Users who are viewing this thread

    Top Bottom