From 2f3fd0a634fb84d54883b06cc0d28cab2282b74d Mon Sep 17 00:00:00 2001 From: "adrien.vanegue.etu" Date: Mon, 15 Jan 2024 14:32:11 +0100 Subject: [PATCH 1/3] deleting debugger inspector selection remembrance mechanism, because it is not much useful and impacts performances --- .../StDebuggerInspector.class.st | 51 ++----------------- 1 file changed, 5 insertions(+), 46 deletions(-) diff --git a/src/NewTools-Debugger/StDebuggerInspector.class.st b/src/NewTools-Debugger/StDebuggerInspector.class.st index e31fdb1ac..bb728a03f 100644 --- a/src/NewTools-Debugger/StDebuggerInspector.class.st +++ b/src/NewTools-Debugger/StDebuggerInspector.class.st @@ -8,11 +8,11 @@ I add specific debugger functionalities: Class { #name : 'StDebuggerInspector', #superclass : 'SpPresenter', + #classTraits : '{} + TraitedClass', #instVars : [ 'inspector', 'model', 'label', - 'rawInspectionSelectionCache', 'assertionFailure', 'lateralToolbar', 'currentLayoutSelector', @@ -187,46 +187,6 @@ StDebuggerInspector >> model: aModel [ inspector model: model ] -{ #category : 'accessing' } -StDebuggerInspector >> rawInspectionSelectionCache [ - ^ rawInspectionSelectionCache ifNil: [ - rawInspectionSelectionCache := Dictionary new ] -] - -{ #category : 'private' } -StDebuggerInspector >> restoreRawInspectionSelectionForContext: aContext [ - aContext ifNil: [ ^ self ]. - self getRawInspectorPresenterOrNil - ifNotNil: [ :raw | - | receiverClass selector path | - receiverClass := aContext receiver class. - selector := aContext selector. - path := self rawInspectionSelectionCache - at: receiverClass -> selector - ifAbsent: [ #() ]. - path ifEmpty: [ self rawInspectionSelectionCache at: receiverClass ifAbsent: [ #() ] ]. - path ifEmpty: [ | roots pathStart | - roots := raw attributeTable roots. - pathStart := 1. - 1 to: roots size do: [ :i | - (roots at: i) key = 'Temps' ifTrue: [ pathStart := i ] ]. - path := {pathStart. 1} ]. - raw selectPath: path ] -] - -{ #category : 'private' } -StDebuggerInspector >> saveRawInspectionSelectionForContext: aContext [ - | selectionPath | - aContext ifNil: [ ^ self ]. - selectionPath := self getRawInspectorSelectedPath. - self rawInspectionSelectionCache - at: aContext receiver class -> aContext selector - put: selectionPath. - self rawInspectionSelectionCache - at: aContext receiver class - put: selectionPath -] - { #category : 'layout' } StDebuggerInspector >> setAssertionLayout [ currentLayoutSelector := self assertionLayoutSelector. @@ -298,14 +258,13 @@ StDebuggerInspector >> updateLayoutForContexts: aContext isAssertionFailure: isT StDebuggerInspector >> updateWith: inspectedObject [ | oldContext newContext | - oldContext := self model inspectedObject ifNotNil: [ :dbgCtx | + oldContext := self model inspectedObject ifNotNil: [ :dbgCtx | dbgCtx context ]. newContext := inspectedObject ifNotNil: [ :dbgCtx | dbgCtx context ]. - (self shouldUpdateContext: oldContext with: newContext) ifFalse: [ ^ self ]. + (self shouldUpdateContext: oldContext with: newContext) ifFalse: [ + ^ self ]. shouldBeUpdated := false. - self saveRawInspectionSelectionForContext: oldContext. self model: (self debuggerInspectorModelClass on: inspectedObject). - self updateEvaluationPaneReceiver. - self restoreRawInspectionSelectionForContext: newContext + self updateEvaluationPaneReceiver ] From 3d4aa59a4aa189a461d20f112674748cf0ff65cc Mon Sep 17 00:00:00 2001 From: "adrien.vanegue.etu" Date: Mon, 15 Jan 2024 14:49:13 +0100 Subject: [PATCH 2/3] removing unnecessary inspector nodes filtering in the debugger inspector --- src/NewTools-Debugger/StDebuggerContext.class.st | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/NewTools-Debugger/StDebuggerContext.class.st b/src/NewTools-Debugger/StDebuggerContext.class.st index af0091db6..b67b45ad8 100644 --- a/src/NewTools-Debugger/StDebuggerContext.class.st +++ b/src/NewTools-Debugger/StDebuggerContext.class.st @@ -127,8 +127,7 @@ StDebuggerContext >> printOn: aStream [ { #category : 'nodes' } StDebuggerContext >> receiverNodes [ - ^ self context receiver allInspectorNodes reject: [ :node | - node label = 'self' ] + ^ self context receiver inspectorNodes ] { #category : 'nodes' } From 2878b8f64af4ae0a22806bd00fd87755e65fc6da Mon Sep 17 00:00:00 2001 From: adri09070 <97704417+adri09070@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:53:11 +0200 Subject: [PATCH 3/3] Removing ' {} + TraitedClass' --- src/NewTools-Debugger/StDebuggerInspector.class.st | 1 - 1 file changed, 1 deletion(-) diff --git a/src/NewTools-Debugger/StDebuggerInspector.class.st b/src/NewTools-Debugger/StDebuggerInspector.class.st index bb728a03f..a4369821d 100644 --- a/src/NewTools-Debugger/StDebuggerInspector.class.st +++ b/src/NewTools-Debugger/StDebuggerInspector.class.st @@ -8,7 +8,6 @@ I add specific debugger functionalities: Class { #name : 'StDebuggerInspector', #superclass : 'SpPresenter', - #classTraits : '{} + TraitedClass', #instVars : [ 'inspector', 'model',