Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce calls from TsExtractor to ExtractorInput.read
We currently read at most 5 packets at a time from the extractor input. Whether this is inefficient depends on how efficiently the underlying DataSource handles lots of small reads. It seems likely, however, that DataSource implementations will in general more efficiently handle fewer larger reads, and in the case of this extractor it's trivial to do this. Notes: - The change appears to make little difference in my testing with DefaultHttpDataSource, although analysis in #3040 suggests that it does help. - This change shouldn't have any negative implications (i.e. at worst it should be neutral wrt performance). In particular it should not make buffering any more likely, because the underlying DataSource should return fewer bytes than are being requested in the case that it cannot fully satisfy the requested amount. Issue: #3040 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162206761
- Loading branch information