Skip to content

Commit 0152a60

Browse files
otherwiseguyralonsoh
authored andcommitted
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 dea48cf)
1 parent f83a97d commit 0152a60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovsdb_monitor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,9 @@ def __init__(self, driver):
608608
pass
609609

610610
def notify(self, event, row, updates=None, global_=False):
611-
row = idlutils.frozen_row(row)
612611
matching = self.matching_events(event, row, updates, global_)
612+
if matching:
613+
row = idlutils.frozen_row(row)
613614
for match in matching:
614615
self.notifications.put((match, event, row, updates))
615616

0 commit comments

Comments
 (0)