The Trunk: Tools-eem.993.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-eem.993.mcz

commits-2
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.993.mcz

==================== Summary ====================

Name: Tools-eem.993
Author: eem
Time: 2 October 2020, 12:35:57.69654 pm
UUID: 0d492fb7-b306-4024-9a98-e18603f5d338
Ancestors: Tools-eem.992

Go a little further in speeding up stepping in the debugger. Cache the translation of 'all inst vars' in In szpector.  Consequently move CurrentLocale up to Inspector form ContextInspector.  Now stepping is pretty good, but even on my 2.9 GHz Core i9 MPB I can click faster than it can keep up, but it doesn't get further than a couple fo sends behind.  That's still  too slow; it *must* keep up for the debugger to feel comfortable.  But we are hopefully only one more source of slow down away now.

=============== Diff against Tools-eem.992 ===============

Item was changed:
  Inspector subclass: #ContextInspector
  instanceVariableNames: ''
+ classVariableNames: 'CachedStackTopLabel CachedTempVarsLabel'
- classVariableNames: 'CachedStackTopLabel CachedTempVarsLabel CurrentLocale'
  poolDictionaries: ''
  category: 'Tools-Inspector'!
 
  !ContextInspector commentStamp: 'ct 1/12/2020 15:26' prior: 0!
  I am an Inspector that is specialized for inspecting Contexts.!

Item was changed:
  StringHolder subclass: #Inspector
  instanceVariableNames: 'object context fields customFields selectionIndex expression contentsTyped fieldListStyler shouldStyleValuePane selectionUpdateTime'
+ classVariableNames: 'CachedAllInstVarsLabel CurrentLocale'
- classVariableNames: ''
  poolDictionaries: ''
  category: 'Tools-Inspector'!
 
  !Inspector commentStamp: 'mt 4/6/2020 15:16' prior: 0!
  I am a tool that allows to inspect and modify the internal representation of an object. As a StringHolder, the string I represent is the value of the currently selected inspector field, which may be an instance variable, of the observed object.
 
  Beside the #contents in my value pane, I have an extra code pane that holds an #expression to be evaluated on the inspected object -- not the currently selected inspector field.
 
  Take a look at my "fields ..." protocols as well as InspectorField.
 
  (Note that the idea of "elements" from the CollectionInspector bleeds a little bit down into this interface to simplify the implementation of field truncation as well as #inspectOne. Sorry for that. Usually, the inspected object will only produce "fields" to display, and maybe "items" in a pop-up menu. Only collections have "elements".)!

Item was added:
+ ----- Method: Inspector>>allInstVarsTranslated (in category 'private') -----
+ allInstVarsTranslated
+ "Alas translation is slow enough that we notice the slow down in trying to step in the debugger..."
+ (CurrentLocale ~= Locale current
+ or: [CachedAllInstVarsLabel isNil]) ifTrue:
+ [CurrentLocale := Locale current.
+ CachedAllInstVarsLabel :=  'all inst vars' translated].
+ ^CachedAllInstVarsLabel!

Item was changed:
  ----- Method: Inspector>>fieldAllInstVars (in category 'fields') -----
  fieldAllInstVars
 
  ^ (self newFieldForType: #all key: #allInstVars)
+ name: self allInstVarsTranslated; emphasizeName;
- name: 'all inst vars' translated; emphasizeName;
  valueGetter: [:object | object longPrintString]; printValueAsIs;
  yourself!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-eem.993.mcz

Christoph Thiede

Hi Eliot,


see Tools-eem.992 for my question about caching the translation.


Allow me another basic question: Did you make sure the delay of "clicking the button frequently" is not (partially) caused by the underlying Morphic code? I'm asking because I believe there are a small number of other situations in plain Squeak where you can press a button without anything being opened so you wouldn't notice the inherent delay of the button.

For example, I noticed a small bug in the PluggableButtonMorph that leads to drawing the button as non-hovered after a click, even if it is being hovered; but at the beginning, I assumed the UI not yet being responsive again. You could also try out your debugging example in MVC (probably you already did this) to see whether the delay is the same.

If you should find any potential for optimization in the PluggableButtonMorph hierarchy, it would be nice if you could report them on the list first before fixing because I am preparing a larger changeset that renews event handling in these classes, so this would probably result in merge conflicts.


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Freitag, 2. Oktober 2020 21:36:06
An: [hidden email]; [hidden email]
Betreff: [squeak-dev] The Trunk: Tools-eem.993.mcz
 
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.993.mcz

==================== Summary ====================

Name: Tools-eem.993
Author: eem
Time: 2 October 2020, 12:35:57.69654 pm
UUID: 0d492fb7-b306-4024-9a98-e18603f5d338
Ancestors: Tools-eem.992

Go a little further in speeding up stepping in the debugger. Cache the translation of 'all inst vars' in In szpector.  Consequently move CurrentLocale up to Inspector form ContextInspector.  Now stepping is pretty good, but even on my 2.9 GHz Core i9 MPB I can click faster than it can keep up, but it doesn't get further than a couple fo sends behind.  That's still  too slow; it *must* keep up for the debugger to feel comfortable.  But we are hopefully only one more source of slow down away now.

=============== Diff against Tools-eem.992 ===============

Item was changed:
  Inspector subclass: #ContextInspector
         instanceVariableNames: ''
+        classVariableNames: 'CachedStackTopLabel CachedTempVarsLabel'
-        classVariableNames: 'CachedStackTopLabel CachedTempVarsLabel CurrentLocale'
         poolDictionaries: ''
         category: 'Tools-Inspector'!
 
  !ContextInspector commentStamp: 'ct 1/12/2020 15:26' prior: 0!
  I am an Inspector that is specialized for inspecting Contexts.!

Item was changed:
  StringHolder subclass: #Inspector
         instanceVariableNames: 'object context fields customFields selectionIndex expression contentsTyped fieldListStyler shouldStyleValuePane selectionUpdateTime'
+        classVariableNames: 'CachedAllInstVarsLabel CurrentLocale'
-        classVariableNames: ''
         poolDictionaries: ''
         category: 'Tools-Inspector'!
 
  !Inspector commentStamp: 'mt 4/6/2020 15:16' prior: 0!
  I am a tool that allows to inspect and modify the internal representation of an object. As a StringHolder, the string I represent is the value of the currently selected inspector field, which may be an instance variable, of the observed object.
 
  Beside the #contents in my value pane, I have an extra code pane that holds an #expression to be evaluated on the inspected object -- not the currently selected inspector field.
 
  Take a look at my "fields ..." protocols as well as InspectorField.
 
  (Note that the idea of "elements" from the CollectionInspector bleeds a little bit down into this interface to simplify the implementation of field truncation as well as #inspectOne. Sorry for that. Usually, the inspected object will only produce "fields" to display, and maybe "items" in a pop-up menu. Only collections have "elements".)!

Item was added:
+ ----- Method: Inspector>>allInstVarsTranslated (in category 'private') -----
+ allInstVarsTranslated
+        "Alas translation is slow enough that we notice the slow down in trying to step in the debugger..."
+        (CurrentLocale ~= Locale current
+         or: [CachedAllInstVarsLabel isNil]) ifTrue:
+                [CurrentLocale := Locale current.
+                 CachedAllInstVarsLabel :=  'all inst vars' translated].
+        ^CachedAllInstVarsLabel!

Item was changed:
  ----- Method: Inspector>>fieldAllInstVars (in category 'fields') -----
  fieldAllInstVars
 
         ^ (self newFieldForType: #all key: #allInstVars)
+                name: self allInstVarsTranslated; emphasizeName;
-                name: 'all inst vars' translated; emphasizeName;
                 valueGetter: [:object | object longPrintString]; printValueAsIs;
                 yourself!




Carpe Squeak!