Only create a frozen Row on matching events
It is very wasteful to create a frozen row copy for every event
that we process. It can dramatically increase the time to process
the initial events from connecting to the database.
Closes-bug: #2011590
Change-Id: Ic4bf26d9b1f937073ddc6d0c3e9d22a777912ebf
(cherry picked from commit dea48cfc0a
)
This commit is contained in:
parent
a415bb4c98
commit
0091a25ea6
|
@ -610,8 +610,9 @@ class OvnDbNotifyHandler(row_event.RowEventHandler):
|
|||
pass
|
||||
|
||||
def notify(self, event, row, updates=None, global_=False):
|
||||
row = idlutils.frozen_row(row)
|
||||
matching = self.matching_events(event, row, updates, global_)
|
||||
if matching:
|
||||
row = idlutils.frozen_row(row)
|
||||
for match in matching:
|
||||
self.notifications.put((match, event, row, updates))
|
||||
|
||||
|
|
Loading…
Reference in New Issue