<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Interesting! Yes, there is redundant work happening when styling field-by-field. Hmmm... one could add some kind cache shared between all "inspector fields" in an inspector. That stepping is not the issue here because debugger inspectors do not step.<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
                        <p style='color: #AAAAAA; margin-top: 10px;'>Am 03.10.2020 00:07:35 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style='font-family:Arial,Helvetica,sans-serif'>


<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;color: #000000;font-family: Calibri,Helvetica,sans-serif">
<p>Hi Tim,</p>
<p><br>
</p>
<p>I added the styling to the inspector fields because, in my opinion, this helps you to identify different kinds of fields faster. But we should start honoring the preference <span>SHTextStylerST80 syntaxHighlightingAsYouType again, this would allow you to
 turn off styling in your individual image.</span></p>
<p><span><br>
</span></p>
<p><span>> </span><span style="font-size: 12pt">And if one *does* feel a need for that, since we know quite a lot about what the field labels are, why can one not do some more focussed action than a general 'err, here, style this thing for me'?</span><span></span></p>
<div><br>
</div>

<p></p>
<div id="x_Signature">
<div id="x_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="x_divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif;font-size: ;margin: 0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</span></div>
</div>
</div>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">This was simply a question of code quality vs. optimization. One main objective of the recent inspector refactoring was to make it easier to extend/subclass it, and reproducing the styler logic would make this
 unnecessarily complicated. Also, the styling must honor be updated when the user interface theme is changed, so using Shout out of the box simply looked like the most straightforward and elegant solution to me ...</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">We could also introduce a cache of the styled field titles in Inspector >> #resetFields by computing a hash value from the list of unstyled field titles.</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Best,</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Christoph</div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;color: #000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim@rowledge.org><br>
<b>Gesendet:</b> Freitag, 2. Oktober 2020 23:37:02<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Cc:</b> packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Trunk: Tools-eem.994.mcz</span>
<div> </div>
</div>
</div>
<span style="font-size: 10pt"><span style="font-size: 10pt">
<div class="PlainText">Forgive the potentially dumb question, but why exactly does one want to use any sort of styling stuff on fields in an inspector?<br>
<br>
And if one *does* feel a need for that, since we know quite a lot about what the field labels are, why can one not do some more focussed action than a general 'err, here, style this thing for me'?<br>
<br>
> On 2020-10-02, at 2:18 PM, Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br>
> <br>
> Hi Eliot,<br>
> <br>
> thanks for the exact steps to reproduce. I will use [1000 timesRepeat: [self performAction]] timeProfile because I don't have the AndreasSystemProfiler.<br>
> <br>
> Does 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.<br>
> 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. :-)<br>
> <br>
> Best,<br>
> Christoph<br>
> Von: Eliot Miranda <eliot.miranda@gmail.com><br>
> Gesendet: Freitag, 2. Oktober 2020 22:59:04<br>
> An: The general-purpose Squeak developers list; Taeumel, Marcel; Thiede, Christoph<br>
> Cc: packages@lists.squeakfoundation.org<br>
> Betreff: Re: [squeak-dev] The Trunk: Tools-eem.994.mcz<br>
>  <br>
> Hi Marcel, Hi Christoph,<br>
> <br>
>     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
<br>
> <br>
> Inspector>>fieldList<br>
> "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."<br>
> ^ self fieldListStyler<br>
> ifNil: [self fields collect: [:field | field name]]<br>
> ifNotNil: [:styler |<br>
> self updateStyler: styler.<br>
> self fields collect: [:field |<br>
> field shouldStyleName<br>
> ifTrue: [styler styledTextFor: field name asText]<br>
> ifFalse: [field name]]]<br>
> <br>
> 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 :-)<br>
> <br>
> Here's how to profile it.  Debug a doit.  I wrote this one:<br>
> <br>
> | t |<br>
> t := 0.<br>
> [| a b c |<br>
> a := 1. b := 2. c := 100.<br>
> (a = 1 and: [b = 2 and: [c = 100]])<br>
> ifTrue:<br>
> [1 to: 100 by: 2 do:<br>
> [:i| t := t + 1]]<br>
> ifFalse:<br>
> [a to: c by: b do:<br>
> [:i| t := t + 1]]] repeat.<br>
> t<br>
> <br>
> Once in the debugger inspect the "Over" button.  Then in that inspector evaluate
<br>
> <br>
>       AndreasSystemProfiler spyOn: [1000 timesRepeat: [self performAction]]<br>
> <br>
> and you'll see that essentially all the time is going into SHTextStylerST80(SHTextStyler) styledTextFor:<br>
> <br>
> On Fri, Oct 2, 2020 at 1:44 PM <commits@source.squeak.org> wrote:<br>
> Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/Tools-eem.994.mcz">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>
> <br>
> <br>
> -- <br>
> _,,,^..^,,,_<br>
> best, Eliot<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; tim@rowledge.org; <a href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a><br>
Do files get embarrassed when they get unzipped?<br>
<br>
<br>
<br>
</div>
</span></span>
</div></blockquote>
                                        </div></body>