mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 18:22:23 +00:00
tracer/parser: use local vars in the iterator function
This saves variable lookups in this thight loop.
This commit is contained in:
parent
876f3994ca
commit
e8fffa073d
1 changed files with 4 additions and 2 deletions
|
@ -73,9 +73,11 @@ class Parser(object):
|
|||
return self
|
||||
|
||||
def __next__(self):
|
||||
log_regex = self.log_regex
|
||||
data = self.data
|
||||
while True:
|
||||
line = next(self.data)
|
||||
match = self.log_regex.match(line)
|
||||
line = next(data)
|
||||
match = log_regex.match(line)
|
||||
if match:
|
||||
g = list(match.groups())
|
||||
g[Parser.F_PID] = int(g[Parser.F_PID])
|
||||
|
|
Loading…
Reference in a new issue