feat: record execution timings and speed up batch queues
This commit is contained in:
1 parent
20d8b81a34
commit
0225787084
12 files changed
+509
-56
No files matched your search
@@ -413,6 +413,7 @@ Function QPAttachOrStart(ByVal ProcessCount)
|
||||
If ProcessCount = 0 Then
|
||||
QP_Stage = "launch_designer"
|
||||
QPLog QP_Root, "INFO", "stage=launch_designer method=COM"
|
||||
QPProgress "launch_designer", 0, 1
|
||||
Set App = CreateObject("Viewdraw.Application")
|
||||
App.Visible = True
|
||||
Else
|
||||
@@ -437,6 +438,7 @@ Sub QPEnsureProject(ByRef App, ByVal TargetPath)
|
||||
Err.Raise vbObjectError + 850, "QuickPartReplace.Session", "confirmed project file does not exist: " & TargetPath
|
||||
QP_Stage = "check_project"
|
||||
QPLog QP_Root, "INFO", "stage=check_project target=" & QPLogField(TargetPath)
|
||||
QPProgress "check_project", 0, 1
|
||||
Set ProjectData = App.GetProjectData()
|
||||
CurrentPath = ""
|
||||
If Not ProjectData Is Nothing Then CurrentPath = CStr(ProjectData.GetProjectFilePath())
|
||||
@@ -449,6 +451,7 @@ Sub QPEnsureProject(ByRef App, ByVal TargetPath)
|
||||
Else
|
||||
QP_Stage = "open_project"
|
||||
QPLog QP_Root, "INFO", "stage=open_project target=" & QPLogField(TargetPath)
|
||||
QPProgress "open_project", 0, 1
|
||||
Opened = App.OpenProject(CStr(TargetPath))
|
||||
If Not Opened Then Err.Raise vbObjectError + 854, "QuickPartReplace.Session", "DxDesigner refused to open the target project"
|
||||
QP_OwnedProject = True
|
||||
@@ -460,6 +463,7 @@ Sub QPEnsureProject(ByRef App, ByVal TargetPath)
|
||||
Err.Raise vbObjectError + 854, "QuickPartReplace.Session", "opened project does not match the confirmed target"
|
||||
If QP_DiscoveryMode Then Exit Sub
|
||||
QP_Stage = "open_sheet"
|
||||
QPProgress "open_sheet", 0, 1
|
||||
Set View = App.ActiveView
|
||||
If Not View Is Nothing And Not QP_BatchMode Then Exit Sub
|
||||
Set Documents = App.SchematicSheetDocuments()
|
||||
|
||||
Reference in new issue
Block a user