[FFmpeg-devel] [PATCH 1/2] avformat/aviobuf: add ff_read_line_to_bprint and ff_read_line_to_bprint_overwrite functions
cus at passwd.hu
Sat Feb 24 21:31:22 EET 2018
On Wed, 14 Feb 2018, Nicolas George wrote:
> Marton Balint (2018-02-11):
>> It is a 500% speed improvement on a 260 MB line compared to using
>> av_bprint_chars, so I'd rather leave it as is. I can add a comment saying
>> "for performance reasons we fill a temporary buffer, and use av_bprint
>> functions on chunks of data".
> This is assuming reading the text file is the only thing that happens.
> In practice, the lines will be parsed, tokenized, with probably quite a
> few mallocs, making the overhead negligible. And if performance were
> really critic, reading the file whole and splitting in memory would
> probably be best.
> But of course, since the optimization is already written and gives a
> significant difference on pure tests, I have no objection as is.
Thanks, applied the series.
More information about the ffmpeg-devel