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
Please register or sign in to comment