Improve logbook context augment performance (#106926)
Makes LazyEventPartialState a bit lazier since almost all the properties are never called.
This commit is contained in:
parent
d8c6534aff
commit
0b9992260a
3 changed files with 35 additions and 19 deletions
|
@ -425,7 +425,7 @@ class EventCache:
|
|||
|
||||
def get(self, row: EventAsRow | Row) -> LazyEventPartialState:
|
||||
"""Get the event from the row."""
|
||||
if isinstance(row, EventAsRow):
|
||||
if type(row) is EventAsRow: # noqa: E721 - this is never subclassed
|
||||
return LazyEventPartialState(row, self._event_data_cache)
|
||||
if event := self.event_cache.get(row):
|
||||
return event
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue