mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 18:26:00 +08:00
Added a few profiling decorators to expensive methods
This commit is contained in:
parent
9a387f9ee2
commit
42fc703516
@ -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…
x
Reference in New Issue
Block a user