[vlc-devel] commit: Removed prefetch whole file advise in the file access. ( Laurent Aimar )

git version control git at videolan.org
Sat Aug 1 14:00:37 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Aug  1 13:52:06 2009 +0200| [2f9dcc357791b94f0f9a7807095f4146813e5cd3] | committer: Laurent Aimar 

Removed prefetch whole file advise in the file access.

On all my linux PC (debian sid and lenny) it has really bad side effects,
mostly when seeking and at startup up (slow or even blocking), and makes
sshfs unusable.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f9dcc357791b94f0f9a7807095f4146813e5cd3
---

 modules/access/file.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/modules/access/file.c b/modules/access/file.c
index d85cc7d..fc4a3c6 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -322,8 +322,6 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
             p_access->info.i_update |= INPUT_UPDATE_SIZE;
         }
 #endif
-        /* Pre-fetch until the end (within memory limits) */
-        posix_fadvise (fd, p_access->info.i_pos, 0, POSIX_FADV_WILLNEED);
     }
     return i_ret;
 }




More information about the vlc-devel mailing list