Here some new precisions:
Time to execute: SystemNavigation new browseMethodsWithSourceString:
'Method source with it' matchCase: false
Pharo 6.1: 2480ms
Pharo 7: 132041ms
The difference seems to come from SourceFileArray>>sourceCodeAt:
Pharo 6.1:
sourceCodeAt: sourcePointer
��"Retrieves the source code for the pointer received as argument"
��^ self
�� readStreamAt: sourcePointer
�� ifPresent: [ :stream | stream nextChunk ]
�� ifAbsent: [ '' ]
Pharo 7:
sourceCodeAt: sourcePointer
��"Retrieves the source code for the pointer received as argument"
��^ self
�� readStreamAt: sourcePointer
�� ifPresent: [ :stream | (ChunkReadStream on: stream) next ]
�� ifAbsent: [ '' ]
It seems that we have a huge performance problem at some points with
the new streams.
On Sat, Mar 17, 2018 at 7:08 PM, Cyril Ferlicot
<cyril.ferlicot@gmail.com> wrote:
> HI,
>
> We have a regression on source code search performances in latest Pharo.
>
> I am on Windows 10.
>
> With Pharo 6.1 it takes a few seconds to look for a string in all the
> image source code.
>
> With the latest Pharo 7 it takes minutes.
>
> To reproduce:
> - Open a playground
> - Type something
> - Select the text, right click
> - Clic on "Code search..." -> "Method source with it"
>
> https://pharo.fogbugz.com/f/cases/21612/Performances- regression-on-source-code- search
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
--
Cyril Ferlicot
https://ferlicot.fr