[WiP] Centralised database in My Video, My Pictures and folder settings (4 Viewers)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,371
    Kyiv
    Home Country
    Ukraine Ukraine

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    How many seconds needs to show the folder?
    Local database ~1-5s
    MySQL databse ~3-15s

    Is it a local folder?
    No. Network share (Windows Home Server 2011)

    Did you move the thumbnails from local machine?
    No. If transfer directory of thumbnails, to the server (hardlink, so work on my computer 3) the speed of opening the folder is almost unchanged.

    I do check on the test computer.

    Where is the mysql server? On WSH or locally?
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    I added 350 files to a network folder and added some statistics rows to my dev build.

    Here is my test result:

    MySQL on remote: GUIVideoFiles:LoadDirectory is finished in 6060 ms
    MySQL on local: GUIVideoFiles:LoadDirectory is finished in 2561 ms
    SQLlite on remote share: GUIVideoFiles:LoadDirectory is finished in 2303 ms
    SQLite on local: GUIVideoFiles:LoadDirectory is finished in 1302 ms

    It means the MySQL is slower then SQLite but the big difference if the database is in remote.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,371
    Kyiv
    Home Country
    Ukraine Ukraine
    It means the MySQL is slower then SQLite but the big difference if the database is in remote.
    Why Kodi no such difference? Well, the local MySQL think very few people interesting. And it is strange that such a big difference in the local MuSKL and remote MySQL.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    Hi.
    It means the MySQL is slower then SQLite
    We have encounter the same while developing SQLite DB plugin for MP2 server, so no big surprise. If you optimize SQLite for speed the difference even gets bigger (up to a factor of 4 means SQLite is four times as fast as MySQL when used as DB backend for MP2 server). So for MP2 there is an easy choice... But in this use-case you need to think about multiple write access at the same time, something SQLite did not like that much. MP2 server is handling all access to the DB, so no issue there, but in MP1 case you can not prevent simultaneous write access in all circumstances.

    Why Kodi no such difference?
    There also is a difference and this may be the reason why the centralized MySQL DB is no part of the regular Kodi release...
    Due to the proper .nfo support a centralized DB is not that important for Kodi than it is for MP. Simply hit "save DB" in GUI and all metadata incl. watched status is saved near to the media. Every client now can access this (and normally did this during startup) so a sync is done semi- automatically once per run...
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    15,492
    10,371
    Kyiv
    Home Country
    Ukraine Ukraine
    There also is a difference and this may be the reason why the centralized MySQL DB is no part of the regular Kodi release...
    As no part? Added 3 lines in the configuration file and everything works out of the box.
    Just not everyone is necessary, and Kodi is more adapted to the type of work: put the USB stick and see.

    Due to the proper .nfo support a centralized DB is not that important for Kodi than it is for MP
    I transferred the the database from MP in Kodi . Unload all NFO, and start the update library on Kodi .
     

    Users who are viewing this thread

    Top Bottom