Commit 165bc2f4 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Set FD_RDAHEAD and FD_NOCACHE on when reading from files. improves reading...

* Set FD_RDAHEAD and FD_NOCACHE on when reading from files. improves reading from networkshares and VMEM usage.
  Suggested by Marko Karppinen.
parent d8c7d7de
...@@ -634,6 +634,14 @@ static int _OpenFile( access_t * p_access, const char * psz_name ) ...@@ -634,6 +634,14 @@ static int _OpenFile( access_t * p_access, const char * psz_name )
strerror(errno) ); strerror(errno) );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
#ifdef HAVE_FCNTL_H
/* We'd rather use any available memory for reading ahead
* than for caching what we've already seen/heard */
fcntl(p_sys->fd, F_RDAHEAD, 1);
fcntl(p_sys->fd, F_NOCACHE, 1);
#endif
#endif #endif
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment