[vlc-devel] [PATCH 0/1] Improve SFTP network performance with buffer

Martin Disch martindisch at gmail.com
Wed Feb 14 17:27:18 CET 2018


On Wed, Feb 14, 2018 at 5:13 PM, Ilkka Ollakka <ileoo at videolan.org> wrote:
> One think that could help is to just change
> ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); in line 460 to form
> ACCESS_SET_CALLBACKS( NULL, Read, Control, Seek );
>
> And change the Read-function to form of (block_t *read( stream_t
> *access, bool *eof). This means that Read function would return
> actual block instead of filling buffer.
>
> I think in that case the prefetch-filter should handle the caching and
> reading in bigger chunks. Also it seems that pf_read-cases (what sftp
> seems to do currently), reads are done in around 4k sizes, as in
> pf_block-case you could define internally for sftp-access to read/return
> 1M blocks?

Thanks for the suggestion, this seems like a much more elegant way to
solve this than what I did.
Interestingly, at some point it was implemented like that. While going
through the history of the module, I found commit
8ede15478214ccabf10c7563194c27ea1175ce5c by RĂ©mi Denis-Courmont from
2015, where he changed the behavior to the Read() we have now. I don't
know the reason for the change, but I assume there must be something.

--
Martin Disch
martindisch at gmail.com


More information about the vlc-devel mailing list