[Etoys] Slow etoys project loading for EPaati

Luke Gorrie luke at member.fsf.org
Thu Feb 7 04:48:02 EST 2008


On 07/02/2008, karl <karl.ramberg at comhem.se> wrote:
> Can the profiling tutorial be shared somehow ?

In this case what I did was find the guts to project loading
(ProjectLoading>>openName:stream:fromDirectory:) and wrap most of the
method body up like this:

  TimeProfileBrowser onBlock: [
  ... original code ...
  ].

and that popped up a window with excellent time profile information.
An alternative way to do this, which doesn't interact so well with
project loading specifically, is to use WorldMenu->debug->'Start
message tally' and then drag the mouse to the top of the screen to
finish profiling.

Now when I'm looking at memory usage I'm using:
  SpaceTally new printSpaceAnalysis
and then running its output (STspace.txt) through e.g.:
  awk '$5 > 1 { print }'
to see classes accounting for >= 1% of memory usage. Then individually
I can do something like:
  (Bitmap allInstances select: [:b | b size > 100000]) explore
and use the inspector's 'chase pointers' command to get some idea of
why each one exists.

So: TimeProfileBrowser, SpaceTally, and the inspector command 'chase
pointers' are all excellent and now you know at least as much about
them as me. :-)

Cheers,
-Luke


More information about the Etoys mailing list