<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Eliot, hi Christoph.<div class="mb_sig"></div>
                                        
                                        <div><br></div><div>How is the current state of this issue? We did some recent improvements in the debugger. Yet, the styling of context variables can be still rather slow. Is it still noticeable?</div><div><br></div><div>Best,</div><div>Marcel</div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 01.10.2020 23:14:48 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">

<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>you can have an inspector field's title be styled by sending "<span>shouldStyleName: true" to it. The styling itself, then, is performed by the Inspector in #fieldList (or just browse the senders of #shouldStyleName), where the styler is invoked. Before
 styling the field list, the styler is configured in #aboutToStyle:requestor:/#updateStyler:requestor: where self doItContext is passed to the styler.</span></p>
<p><span><br>
</span></p>
<p><span>So tl;dr: Styling is always applied late (after the field list is constructed), you cannot break it by caching the temp names earlier. :-)</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"><span style="font-family: 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>
</span></div>
</div>
</div>
</div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="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 Eliot Miranda <eliot.miranda@gmail.com><br>
<b>Gesendet:</b> Donnerstag, 1. Oktober 2020 20:33:08<br>
<b>An:</b> The general-purpose Squeak developers list; Taeumel, Marcel<br>
<b>Betreff:</b> Re: [squeak-dev] Can we make computing the local variables in the debugger lazy?</span>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-size: 14pt">Hi Christoph,<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Sep 30, 2020 at 2:27 AM Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</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;min-width: 500px">
<div>
<div id="gmail-m_-8996936354550329205divtagdefaultwrapper" style="font-size: 12pt;color: rgb(0,0,0);font-family: Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi Eliot,</p>
<p><br>
</p>
<p>> <span>Can you point me to where in ContextInspector the emphasis for the temp vars is chosen?</span></p>
<p><span><br>
</span></p>
<p>By convention, inspector fields are defined in the category "fields - streaming". So you are probably searching for ContextInspector >> #<span>streamTemporaryVariablesOn: or ContextVariablesInspector >> #<span>streamTemporaryVariablesOn:?</span></span></p>
</div>
</div>
</blockquote>
<div><br>
</div>
<div class="gmail_default" style="font-size: 14pt">I found this code; I don't see any text emphasis going on.  Where is the code that turns temp variables red when they're out of scope?  Marcel?</div>
<div class="gmail_default" style="font-size: 14pt"><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;min-width: 500px">
<div>
<div id="gmail-m_-8996936354550329205divtagdefaultwrapper" style="font-size: 12pt;color: rgb(0,0,0);font-family: Calibri,Helvetica,sans-serif" dir="ltr">
<p><span><span>Looking forward to your optimization! :-)</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span>Best,</span></span></p>
<p><span><span>Christoph</span></span></p>
<div id="gmail-m_-8996936354550329205Signature">
<div id="gmail-m_-8996936354550329205divtagdefaultwrapper" 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">
<div>
<div id="gmail-m_-8996936354550329205Item.MessagePartBody">
<div id="gmail-m_-8996936354550329205Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="gmail-m_-8996936354550329205divtagdefaultwrapper"><span style="font-family: Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="gmail-m_-8996936354550329205Signature">
<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/" rel="noopener noreferrer" id="gmail-m_-8996936354550329205LPNoLP" target="_blank"><font size="2"><span id="gmail-m_-8996936354550329205LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</span></div>
</div>
</div>
</div>
</div>
<div><span style="font-size: 10pt;color: #808080"></span></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-8996936354550329205divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;color: #000000"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>>
 im Auftrag von Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>><br>
<b>Gesendet:</b> Mittwoch, 30. September 2020 09:09:27<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Can we make computing the local variables in the debugger lazy?</span>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div style="font-size: 14pt">Hi Marcel,<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Sep 29, 2020 at 1:07 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</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;min-width: 500px">
<div id="gmail-m_-8996936354550329205gmail-m_273208692865051878__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)">
Hi Eliot, hi all!
<div><br>
</div>
<div>I fixed the issue with Tools-mt.989. The logic was already there in #runUntil.</div>
</div>
</blockquote>
<div><br>
</div>
<div style="font-size: 14pt">Can you point me to where in ContextInspector the emphasis for the temp vars is chosen?  I want to modify ContextInspector to cache the temp names for a given method because I believe this will speed up stepping a lot.  However
 I couldn't find where the emphasis is applied so I'm worried that my cache may break something.  If I can see where that is being done I have a better chance at avoiding breaking things.</div>
<div style="font-size: 14pt"><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;min-width: 500px">
<div id="gmail-m_-8996936354550329205gmail-m_273208692865051878__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: rgb(0,0,0)">
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div></div>
<blockquote type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color:rgb(170,170,170);margin-top:10px">Am 19.09.2020 23:00:33 schrieb Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">Hi Christoph, <br>
<br>
On Sat, 19 Sep 2020, Thiede, Christoph wrote: <br>
<br>
> <br>
> Hi Eliot, <br>
> <br>
> <br>
> very nice finding once again! I #timeProfile'd the menu button action and as I expected, the most expensive operation is the shout styling by the new inspectors, including the decompilation of every method:
<br>
<br>
What was it exactly that you profiled? <br>
<br>
The screenshot shows that 76.9% was spent in #initializeVariablesFromContext, <br>
of which 52.5% of the time was spent in CompiledMethod(CompiledCode) >> <br>
#getSource. The rest of the tree is not visible, but these methods have <br>
nothing to do with parsing or styling, they initialize the parser and <br>
normally should take <1 ms. <br>
<br>
Also, why is the decompiler producing the source code? <br>
<br>
> <br>
> <br>
> [IMAGE] <br>
> <br>
> <br>
> First, when loading ShoutCore-ct.78 (Inbox), the speed doubles (but probably that's rather a problem with my sources file, see the thread about this commit).
<br>
<br>
You may want to try compiling a VM where FilePlugin's CreateFile does not <br>
set the FILE_FLAG_SEQUENTIAL_SCAN flag, and see if it helps with file <br>
reading performance. <br>
<br>
<br>
Levente <br>
<br>
> <br>
> Second, we do not redraw the world while running to the selection, so we do not need to update the inspectors at all. I think we could split up #doStep into some #basicDoStep (which would perform the actual stepping logic) +
<br>
> some #updateContextDuring: (which would update the stack list and the inspectors), then we would need to trigger the updates only once from #runToSelection:.
<br>
> As an alternative, we could make this method a bit more complex but responsive by applying the same updating logic from #runUntil.
<br>
> <br>
> What do you think? :-) <br>
> <br>
> Best, <br>
> Christoph <br>
> <br>
> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________
<br>
> Von: Squeak-dev <u></u>im Auftrag von Eliot Miranda <u></u><br>
> Gesendet: Samstag, 19. September 2020 20:17:12 <br>
> An: The general-purpose Squeak developers list; Taeumel, Marcel <br>
> Betreff: [squeak-dev] Can we make computing the local variables in the debugger lazy?  
<br>
> Hi Marcel, <br>
> <br>
>     can we try and reduce the frequency at which we compute the variables in the context inspector in the debugger?  It is a noticeable performance hit.  I really like the user interface, but the performance hit is making
<br>
> debugging difficult. <br>
> <br>
> As an example use this: <br>
> <br>
> | samples sineTable sound | <br>
> "1 second of A below middle C (220Hz). 16000 / 220 is 72.72 recurring" <br>
> sineTable := SoundPlayer sineTable: 73. <br>
> sineTable doWithIndex: "And let's not deafen anyone..." <br>
> [:sample :index| sineTable at: index put: sample // 4]. <br>
> samples := SoundBuffer new: 16000. <br>
> 1 to: samples size by: sineTable size do: <br>
> [:i| samples replaceFrom: i to: (i + sineTable size - 1 min: 16000) with: sineTable startingAt: 1].
<br>
> 1 to: 146 do: <br>
> [:i| <br>
> samples at: i put: ((samples at: i) * i / 146) asInteger. <br>
> samples at: 16001 - i put: ((samples at: 16001 - i) * i / 146) asInteger]. <br>
> sound := SampledSound <br>
> samples: samples <br>
> samplingRate: 16000. <br>
> sound := MixedSound new <br>
> add: sound pan: 0.25; <br>
> add: sound pan: 0.75; <br>
> yourself. <br>
> sound computeSamplesForSeconds: sound duration <br>
> <br>
> <br>
> Open a workspace in e.g. a 64-bit image prior to Tools-mt.965 (I used an image containing Tools-mt.942).  Debug the above in the workspace.  Position the cursor at "sound computeSamplesForSeconds: sound duration" and do "run
<br>
> to here".  It is essentially instantaneous. <br>
> <br>
> Now do the same in a contemporary trunk image.  It takes almost 6 seconds. <br>
> <br>
> I used to be able to click step as fast as I could and the system would keep up with me.  Now I find that if I click too fast I can accumulate excess clicks and when I stp clicking the system will continue stepping and go too
<br>
> far. <br>
> <br>
> I don't want to lose the feedback the new variables list gives us.  But I do find the performance hit tedious.  I wonder could we cache the list and only update it
<br>
> - when Morphic updates, and <br>
> - when the context changes? <br>
> <br>
> <br>
> _,,,^..^,,,_ <br>
> best, Eliot <br>
> <br>
><u></u><u></u></div>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div><span style="font-size: 10pt;border-collapse: separate">
<div>_,,,^..^,,,_<br>
</div>
<div>best, Eliot</div>
</span></div>
</div>
</div>
</div>
</div>
</div>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div><span style="font-size: 10pt;border-collapse: separate">
<div>_,,,^..^,,,_<br>
</div>
<div>best, Eliot</div>
</span></div>
</div>
</div>
</div>
</div>
</div></blockquote></div>