mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
perf: cache action widgets to don't recalculate it
This commit is contained in:
parent
bb3f87ae51
commit
cfa7278568
1 changed files with 4 additions and 2 deletions
|
@ -19,8 +19,10 @@
|
|||
|
||||
|
||||
import typing as T
|
||||
from .response_id import ResponseId
|
||||
from functools import cached_property
|
||||
|
||||
from .common import *
|
||||
from .response_id import ResponseId
|
||||
|
||||
|
||||
class ObjectContent(AstNode):
|
||||
|
@ -81,7 +83,7 @@ class Object(AstNode):
|
|||
if self.gir_class:
|
||||
return self.gir_class.doc
|
||||
|
||||
@property
|
||||
@cached_property
|
||||
def action_widgets(self) -> T.List[ResponseId]:
|
||||
"""Get list of widget's action widgets.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue