mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Added a few profiling decorators to expensive methods
This commit is contained in:
parent
9a387f9ee2
commit
42fc703516
2 changed files with 4 additions and 1 deletions
|
@ -5,7 +5,7 @@ from PyQt5.QtCore import Qt, pyqtSignal, pyqtProperty, QTimer
|
|||
|
||||
import UM.Qt.ListModel
|
||||
from UM.Application import Application
|
||||
|
||||
import UM.FlameProfiler
|
||||
from cura.Settings.ExtruderManager import ExtruderManager
|
||||
|
||||
## Model that holds extruders.
|
||||
|
@ -129,6 +129,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
|||
## Update the list of extruders.
|
||||
#
|
||||
# This should be called whenever the list of extruders changes.
|
||||
@UM.FlameProfiler.profile
|
||||
def __updateExtruders(self):
|
||||
changed = False
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ from UM.Settings.SettingDefinition import SettingDefinition
|
|||
from UM.Settings.SettingFunction import SettingFunction
|
||||
from UM.Settings.Validator import ValidatorState
|
||||
from UM.Signal import postponeSignals
|
||||
import UM.FlameProfiler
|
||||
|
||||
from cura.QualityManager import QualityManager
|
||||
from cura.PrinterOutputDevice import PrinterOutputDevice
|
||||
|
@ -855,6 +856,7 @@ class MachineManager(QObject):
|
|||
#
|
||||
# \param quality_name \type{str} the name of the quality.
|
||||
# \return \type{List[Dict]} with keys "stack", "quality" and "quality_changes".
|
||||
@UM.FlameProfiler.profile
|
||||
def determineQualityAndQualityChangesForQualityType(self, quality_type):
|
||||
quality_manager = QualityManager.getInstance()
|
||||
result = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue