2015-09-10, 12:15
Starting a movie might be extremely slow (> 10 seconds). Especially when started from a SMB share and when Kodi is run on a Raspberry Pi, e.g. through the OpenELEC distribution.
In my case, this was caused by the search for the default subtitle, but for e.g. home movies, this is wasted resources.
I have a 1000 homemovies, with 1000 nfo files and 1000 poster.jpg files (one for each), so 3000 files in total in one folder.
As a counter example, I've installed and run Kodi from my Windows laptop. There the start delay is about 2-3 seconds as opposed to 15 seconds on the Raspberry Pi. The issue therefore appears to be in the parsing of the 3000 files ON the Raspberry Pi, not retrieving the list itself.
How to check if it effects you? Open kodi.log using a text editor and search for "ScanForExternalSubtitles: END". If the "total time" is more then say 10000 ms, then Kodi is trying to search for a subtitle file, e.g. movie.srt. There probably are none for a home movie, so this is not necessary
So, feature request: would it be possible to DISABLE the search for a subtitle in the default location when starting a movie?
Some more background information:
The function that scans for local subtitle files in the movie folder is hard-coded to always run. The function CUtil::ScanForExternalSubtitles can be found in the Kodi source code file util.cpp on github: https://github.com/xbmc/xbmc
The list of subtitle extensions Kodi scans for are hard-coded in source code file AdvancedSettings.cpp in global variable m_subtitlesExtensions and cannot be set using e.g. advancedsettings.xml. So no way to filter
The only acceptable workaround is to divide home videos over subfolders, e.g. per year, with a maximum of about 250 videos per folder, to keep the load on an acceptable level (in this particular case).
And no, I don't want to remove that function from the source and recompile each new version myself...
In my case, this was caused by the search for the default subtitle, but for e.g. home movies, this is wasted resources.
I have a 1000 homemovies, with 1000 nfo files and 1000 poster.jpg files (one for each), so 3000 files in total in one folder.
As a counter example, I've installed and run Kodi from my Windows laptop. There the start delay is about 2-3 seconds as opposed to 15 seconds on the Raspberry Pi. The issue therefore appears to be in the parsing of the 3000 files ON the Raspberry Pi, not retrieving the list itself.
How to check if it effects you? Open kodi.log using a text editor and search for "ScanForExternalSubtitles: END". If the "total time" is more then say 10000 ms, then Kodi is trying to search for a subtitle file, e.g. movie.srt. There probably are none for a home movie, so this is not necessary
So, feature request: would it be possible to DISABLE the search for a subtitle in the default location when starting a movie?
Some more background information:
The function that scans for local subtitle files in the movie folder is hard-coded to always run. The function CUtil::ScanForExternalSubtitles can be found in the Kodi source code file util.cpp on github: https://github.com/xbmc/xbmc
The list of subtitle extensions Kodi scans for are hard-coded in source code file AdvancedSettings.cpp in global variable m_subtitlesExtensions and cannot be set using e.g. advancedsettings.xml. So no way to filter
The only acceptable workaround is to divide home videos over subfolders, e.g. per year, with a maximum of about 250 videos per folder, to keep the load on an acceptable level (in this particular case).
And no, I don't want to remove that function from the source and recompile each new version myself...