xbmc/xbmc — comment on commit a51927c31fc3e30d11f25c052a28a710e951dbdf
File:  line 0
By Memphiz:

Adding this lock gives the following issue here on osx/ios.

When ffmpeg opens a video it does a seek and a read for each chapter in the movie. Depending on the number of chapters these are bunch of seeks.

When using a stream source (http/upnp) - the filecache is activated automatically. And seeking with filecache is threaded and uses an event for syncronistation. With this lock in place the event.set in https://github.com/xbmc/xbmc/blob/master/xbmc/filesystem/FileCache.cpp#L225 lasts between 400ms and 1000ms.

This causes http://trac.xbmc.org/ticket/11999 and a general slow down of movie starting when chapters are involved. (on a test movie with this lock it times out and needs about 35 sec to start a 29 chapter file with 2,5gb size. Removing the lock brings this time down to 9 seconds - all on a ipad with wlan).