Skip to content
Commit f0666e4e authored by Jérémy Bobbio's avatar Jérémy Bobbio
Browse files

Read lines using an iterator instead of loading a full list in memory

The StreamReader.readlines() creates a list instead of an iterator. This
meant that we were previously loading the entire content fead to diff
in memory instead of streaming it as it was produced. This meant we
were creating huge buffers for no reasons!

So let's replace all `for line in f.readlines():` by `for line in f:` which
will properly use an iterator for the same end result.

Thanks Mike Hommey for the report and good test case.

Closes: #808120
parent 4530f664
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