GNOME Bugzilla – Bug 652037
basesrc: less persistent caching of size
Last modified: 2013-06-06 14:51:53 UTC
Created attachment 189384 [details] [review] basesrc: add dynamic size handling basesrc currently only checks with the subclass for updated size when it might be reading past the end of the currently indicated size. However, the same size is also used to answer to duration queries, which might therefore grow stale. Attached patch allows subclass to request more dynamic size handling.
commit f8168cd75f12d31332e981dcb2bbb8b56af967ec Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Wed Jun 8 18:22:03 2011 +0200 basesrc: add dynamic size handling This allows subclass to indicate that size reported by src may not be static and should as such be updated regularly, rather than only when really needed. Particular examples are filesrc or fdsrc reading from a file that is still growing (e.g. being downloaded). Fixes #652037.
This introduced bug #652037 It's not really a good idea to call fstat() for every single read. What's the actual bug that was fixed by this?
This introduced bug #701672 It's not really a good idea to call fstat() for every single read. What's the actual bug that was fixed by this?
*** Bug 701672 has been marked as a duplicate of this bug. ***
commit bab1122a93a67c5b789fca2161249b29497db3c4 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Thu Jun 6 16:46:12 2013 +0200 basesrc: Only force-update the duration for dynamic sources when doing the D Doing it after every single create() is not very efficient and not necessary Especially on network file systems fstat() is not cached and causes network traffic, making the source possibly unusable slow. https://bugzilla.gnome.org/show_bug.cgi?id=652037