[squeak-dev] The Trunk: Tools-eem.994.mcz
Eliot Miranda
eliot.miranda at gmail.com
Fri Oct 2 20:59:04 UTC 2020
Hi Marcel, Hi Christoph,
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
Inspector>>fieldList
"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."
^ self fieldListStyler
ifNil: [self fields collect: [:field | field name]]
ifNotNil: [:styler |
self updateStyler: styler.
self fields collect: [:field |
field shouldStyleName
ifTrue: [styler styledTextFor: field name asText]
ifFalse: [field name]]]
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 :-)
Here's how to profile it. Debug a doit. I wrote this one:
| t |
t := 0.
[| a b c |
a := 1. b := 2. c := 100.
(a = 1 and: [b = 2 and: [c = 100]])
ifTrue:
[1 to: 100 by: 2 do:
[:i| t := t + 1]]
ifFalse:
[a to: c by: b do:
[:i| t := t + 1]]] repeat.
t
Once in the debugger inspect the "Over" button. Then in that
inspector evaluate
AndreasSystemProfiler spyOn: [1000 timesRepeat: [self performAction]]
and you'll see that essentially all the time is going
into SHTextStylerST80(SHTextStyler) styledTextFor:
On Fri, Oct 2, 2020 at 1:44 PM <commits at source.squeak.org> wrote:
> Eliot Miranda uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-eem.994.mcz
>
> ==================== Summary ====================
>
> Name: Tools-eem.994
> Author: eem
> Time: 2 October 2020, 1:44:29.015648 pm
> UUID: 23145257-280d-4a4a-a4ba-3b5cc367f9a9
> Ancestors: Tools-eem.993
>
> Oops! Compiledmethod>>blockExtentsToTempsMap needs to observe that
> startKeysToBlockExtents has moved to DebuggerMethodMap.
>
> =============== Diff against Tools-eem.993 ===============
>
> Item was changed:
> ----- Method: CompiledMethod>>blockExtentsToTempsMap (in category
> '*Tools-Debugger-support') -----
> blockExtentsToTempsMap
> "If the receiver has been copied with temp names answer a
> map from blockExtent to temps map in the same format as
> BytecodeEncoder>>blockExtentsToTempNamesMap. if the
> receiver has not been copied with temps answer nil."
> ^self holdsTempNames ifTrue:
> + [self mapFromBlockKeys: (self debuggerMap
> startKeysToBlockExtents values sort: [:assocA :assocB| assocA first <=
> assocB first])
> - [self mapFromBlockKeys: (self startKeysToBlockExtents
> values sort: [:assocA :assocB| assocA first <= assocB first])
> toSchematicTemps: self tempNamesString]!
>
>
>
--
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201002/8b2516f3/attachment.html>
More information about the Squeak-dev
mailing list
|