Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fastening debugger stack navigation #654

Open
wants to merge 3 commits into
base: Pharo13
Choose a base branch
from

Conversation

adri09070
Copy link
Contributor

Fixes #584
The whole discussion is in this issue.

To fasten the navigation of the debugger stack, I removed the debugger inspector selection remembrance mechanism because it :

  • makes the debugger inspector too long to update. Removing it speeds up makes the process twice faster
  • is not accurate
  • is not much useful, in the end ?

Furthermore, I modified the way the #receiverNodes are built for an StDebuggerContext object. It used to collect allInspectorNodes and then reject the self node, like this:

receiverNodes

	^ self context receiver allInspectorNodes reject: [ :node | 
		  node label = 'self' ]

while #allInspectorNodes actually adds a self node to the nodes returned by #inspectorNodes:

allInspectorNodes
	"Answer a list of attributes as nodes"

	^ { StInspectorSelfNode hostObject: self }, 
		self inspectorNodes

So to spare an unncessary filter, I changed #receiverNodes to this equivalent method:

receiverNodes

	^ self context receiver inspectorNodes

If you have some examples of programs to debug for which the stack navigation was slow, I'm eager to know

@adri09070
Copy link
Contributor Author

Unrelated error: pharo-project/pharo#15953

@Ducasse
Copy link
Contributor

Ducasse commented Jan 22, 2024

Thanks adrian What is the 'debugger inspector selection remembrance mechanism'? Because it looks like a nice feature.

@adri09070
Copy link
Contributor Author

Thanks adrian What is the 'debugger inspector selection remembrance mechanism'? Because it looks like a nice feature.

If you select a variable in the debugger inspector, then if you select another context in the context stack and then select again the previous context in the contexts stack, the debugger inspector automatically selects again the variable that was selected before you switched contexts

@adri09070 adri09070 closed this Jan 22, 2024
@adri09070 adri09070 reopened this Jan 22, 2024
@Ducasse
Copy link
Contributor

Ducasse commented Jan 22, 2024

Thanks for the explanation. I was wondering this is slow.

@estebanlm
Copy link
Member

uhm... the problem with this is that it cancels the effect "flow" that we have now with the inspector, making it harder to navigate in some situations.

@Ducasse Ducasse changed the base branch from Pharo12 to Pharo13 June 13, 2024 07:44
@Ducasse
Copy link
Contributor

Ducasse commented Jun 13, 2024

So what is the decision on this issue.
I moved it to the Pharo13 branch.

@Ducasse
Copy link
Contributor

Ducasse commented Aug 1, 2024

So what is the decision for this issue?

@StevenCostiou
Copy link
Member

In the current state, and specifically because we have not yet been able to exactly locate the source of the latency (it seems to come from spec but it could be how we use it):

  • either we gain speed, but we lose the selection of inspectors if we change context in the stack (this PR)
  • or we keep the selection (if I change context and come back, my previous selection in the inspector is maintained) but it remains slow

Today we can only propose these two options.
For more, it will have to wait september.

@StevenCostiou
Copy link
Member

For more precision, the scenario is:

  • you open a debugger which starts at context [C], you start digging in the inspector (so you have selected a variable in the inspector and we call it [A])
  • you change context
  • you go back to [C], [A] is automatically selected in the inspector because it was the last selection

It is this reselection of [A] that provokes a visible latency in the debugger.
This latency is not present in gtk.

@Ducasse
Copy link
Contributor

Ducasse commented Aug 2, 2024

Tx for investigating

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigating the debugger stack is super slow
4 participants