[squeak-dev] Question about inlining | How to access named temps in FullBlockClosure?

Levente Uzonyi leves at caesar.elte.hu
Mon Mar 30 19:16:33 UTC 2020


You should fire up the VM with some profiler (I don't know what's 
available on windows) to see why file access is so slow.


Levente

On Mon, 30 Mar 2020, Thiede, Christoph wrote:

> 
> > | regex |
> > regex := 'to\:[\s\r\n]*\w+[\s\r\n]*do\:[\s\r\n]*\[[^\]]*\[' asRegex.
> > CurrentReadOnlySourceFiles cacheDuring: [
> >          SystemNavigation default browseAllSelect: [ :method |
> >                  regex search: method getSource asString ] ].
> 
> This still timed out my patience after 10 minutes :(
> 
> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim at rowledge.org>
> Gesendet: Montag, 30. März 2020 19:42:31
> An: The general-purpose Squeak developers list
> Betreff: Re: [squeak-dev] Question about inlining | How to access named temps in FullBlockClosure?  
> 
> 
> > On 2020-03-30, at 10:36 AM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> >
> >
> > Try this instead:
> >
> > | regex |
> > regex := 'to\:[\s\r\n]*\w+[\s\r\n]*do\:[\s\r\n]*\[[^\]]*\[' asRegex.
> > CurrentReadOnlySourceFiles cacheDuring: [
> >        SystemNavigation default browseAllSelect: [ :method |
> >                regex search: method getSource asString ] ].
> >
> > The key differences are:
> > - caching source files (as Nicolas suggested)
> > - converting the source to String from Text (regex is intended to work with Strings not Texts)
> > - using #search: instead of #matches:
> >
> > This brings down the runtime to 2.5 seconds on my machine.
> 
> And a smidge over 10 sec on my Pi 4 :-)
> 
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> A computer program does what you tell it to do, not what you want it to do.
> 
> 
> 
> 
>


More information about the Squeak-dev mailing list