<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Eliot,</p>
<p><br>
</p>
<p>thanks for the exact steps to reproduce. I will use <span>[1000 timesRepeat: [self performAction]] timeProfile because I don't have the <span>AndreasSystemProfiler.</span></span></p>
<p><br>
</p>
<p>Does <span>ShoutCore-ct.78 from the inbox help you to speed things up? For me, it speeds up the call from 3.84 sec down to 1.07 sec - but still, there happens a lot of redundant shout styling.</span></p>
<p><span>Hm, why can't we recreate the fields lazily in #fields instead of doing this eagerly in #resetFields? This is how I originally implemented it but then Marcel changed it - I don't know the reason. :-)</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Eliot Miranda <eliot.miranda@gmail.com><br>
<b>Gesendet:</b> Freitag, 2. Oktober 2020 22:59:04<br>
<b>An:</b> The general-purpose Squeak developers list; Taeumel, Marcel; Thiede, Christoph<br>
<b>Cc:</b> packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Trunk: Tools-eem.994.mcz</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-size:large">Hi Marcel, Hi Christoph,</div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large">    I emailed the list and cc'ed you to get your attention.  Forgive my rude interruption.  I finally found out where the slow down really is.  It is in </div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif">Inspector>>fieldList</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>"Return a list of texts that identify the fields for the object under inspection so that the user can make
 an informed decision on what to inspect."</font></div>
<div class="gmail_default" style="font-size:large"><span class="gmail-Apple-tab-span" style="white-space:pre"><font face="times new roman, serif"></font></span></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>^ self fieldListStyler</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>ifNil: [self fields collect: [:field | field name]]</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>ifNotNil: [:styler |</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>self updateStyler: styler.</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>self fields collect: [:field |</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>field shouldStyleName</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>ifTrue: [styler styledTextFor: field name asText]</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>ifFalse: [field name]]]</font></div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large">So this runs a styler over the entire method every time one steps.  And if one is stepping through a doit it will call the decompiler to generate the source to style, every time you step.  We have to do better
 :-)</div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large">Here's how to profile it.  Debug a doit.  I wrote this one:</div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large"><span class="gmail-Apple-tab-span" style="white-space:pre"></span><font face="times new roman, serif">| t |</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>t := 0.</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>[| a b c |</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>a := 1. b := 2. c := 100.</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>(a = 1 and: [b = 2 and: [c = 100]])</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>ifTrue:</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>[1 to: 100 by: 2 do:</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>[:i| t := t + 1]]</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>ifFalse:</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>[a to: c by: b do:</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>[:i| t := t + 1]]] repeat.</font></div>
<div class="gmail_default" style="font-size:large"><font face="times new roman, serif"><span class="gmail-Apple-tab-span" style="white-space:pre"></span>t</font></div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large">Once in the debugger inspect the "Over" button.  Then in that inspector evaluate </div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large">      <font face="times new roman, serif">
AndreasSystemProfiler spyOn: [1000 timesRepeat: [self performAction]]</font></div>
<div class="gmail_default" style="font-size:large"><br>
</div>
<div class="gmail_default" style="font-size:large">and you'll see that essentially all the time is going into SHTextStylerST80(SHTextStyler) styledTextFor:</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Oct 2, 2020 at 1:44 PM <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-eem.994.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Tools-eem.994.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-eem.994<br>
Author: eem<br>
Time: 2 October 2020, 1:44:29.015648 pm<br>
UUID: 23145257-280d-4a4a-a4ba-3b5cc367f9a9<br>
Ancestors: Tools-eem.993<br>
<br>
Oops! Compiledmethod>>blockExtentsToTempsMap needs to observe that startKeysToBlockExtents has moved to DebuggerMethodMap.<br>
<br>
=============== Diff against Tools-eem.993 ===============<br>
<br>
Item was changed:<br>
  ----- Method: CompiledMethod>>blockExtentsToTempsMap (in category '*Tools-Debugger-support') -----<br>
  blockExtentsToTempsMap<br>
        "If the receiver has been copied with temp names answer a<br>
         map from blockExtent to temps map in the same format as<br>
         BytecodeEncoder>>blockExtentsToTempNamesMap.  if the<br>
         receiver has not been copied with temps answer nil."<br>
        ^self holdsTempNames ifTrue:<br>
+               [self mapFromBlockKeys: (self debuggerMap startKeysToBlockExtents values sort: [:assocA :assocB| assocA first <= assocB first])<br>
-               [self mapFromBlockKeys: (self startKeysToBlockExtents values sort: [:assocA :assocB| assocA first <= assocB first])<br>
                        toSchematicTemps: self tempNamesString]!<br>
<br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div><span style="font-size:small;border-collapse:separate">
<div>_,,,^..^,,,_<br>
</div>
<div>best, Eliot</div>
</span></div>
</div>
</div>
</div>
</body>
</html>