Add some profiling decorators to the ContainerTree

This commit is contained in:
Jaime van Kessel 2019-10-04 13:29:22 +02:00
parent 71e9fb8a22
commit 85ed22de4c
No known key found for this signature in database
GPG key ID: 3710727397403C91
6 changed files with 15 additions and 3 deletions

View file

@ -13,6 +13,7 @@ from cura.Machines.QualityChangesGroup import QualityChangesGroup # To construc
from cura.Machines.QualityGroup import QualityGroup # To construct groups of quality profiles that belong together.
from cura.Machines.QualityNode import QualityNode
from cura.Machines.VariantNode import VariantNode
import UM.FlameProfiler
## This class represents a machine in the container tree.
@ -168,6 +169,7 @@ class MachineNode(ContainerNode):
return self.global_qualities.get(self.preferred_quality_type, next(iter(self.global_qualities.values())))
## (Re)loads all variants under this printer.
@UM.FlameProfiler.profile
def _loadAll(self):
container_registry = ContainerRegistry.getInstance()
if not self.has_variants: