GNOME Bugzilla – Bug 697289
gvfs readahead is overly aggressive
Last modified: 2013-04-05 12:44:40 UTC
Right now whenever you do a read on a GVfsReadChannel we start a readahead operation whenever a read is done, even if the last read was a readahead operation. This means that if you just keep a channel open without reading we will be sending a lot of data down the pipe. We need some way to synchronize this so that unless the reader side actually reads some of the data we need to stop reading ahead.
See also bug 697298 for the more specific GStreamer performance problem.
Created attachment 240723 [details] [review] Fix readahead behaviour We were constantly adding extra readahead operations that were not really needed. A single readahead is necessary to get the read operations pipelined (see comment). Also, avoid readahead for the first read to handle random access i/o better.
Attachment 240723 [details] pushed as 4efd634 - Fix readahead behaviour