Minor performance optimizations

This commit is contained in:
James Westman 2023-06-13 17:39:59 -05:00
parent 9c567fe039
commit 4e02c34a5b
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
3 changed files with 19 additions and 13 deletions

View file

@ -17,6 +17,8 @@
#
# SPDX-License-Identifier: LGPL-3.0-or-later
from functools import cached_property
from .. import gir
from .imports import GtkDirective, Import
from .gtkbuilder_template import Template
@ -42,7 +44,7 @@ class UI(AstNode):
),
]
@property
@cached_property
def gir(self) -> gir.GirContext:
gir_ctx = gir.GirContext()
self._gir_errors = []