mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
support/scripts/pkg-stats: don't buffer whole file searching for infra
The file handle can be iterated over directly and each line is used
exactly once, so the only effect of reading all lines into a list
first was higher memory use and complexity.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
(cherry picked from commit 07f7ad9898)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
5c5c8f4b08
commit
0b36bd22e8
@@ -197,8 +197,7 @@ class Package:
|
||||
|
||||
self.infras = list()
|
||||
with open(self.pkgfile, 'r') as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
for line in f:
|
||||
match = INFRA_RE.match(line)
|
||||
if not match:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user