[Pharo-project] Speeding up Finder string search

Stefan Marr smalltalk at stefan-marr.de
Sun Jan 15 18:11:00 CET 2012


Hi:

The finder is annoyingly slow when doing string searches.
Compared to a 'grep' its multiple magnitudes slower, at least from my perception :(

Profiling pointed my at RemoteString>>string and its use of readOnlyCopy on the SourceFiles.

I put a cache of these read only files into ExpandedSourceFileArray and get a nice speedup.

{ [ Finder new constructSourceDictionary ] timeToRun.
 [ Finder new constructSourceDictionary ] timeToRun.
 [ Finder new constructSourceDictionary ] timeToRun . } 

Without Cache: #(32079 29034 32274)
With    Cache: #(10757 10718 11050)


While that works for the searching, it does fall apart for other uses of RemoteString>>string. (For instance, filing out the changes...)


If anyone has an idea how to avoid the overhead of copying, I would be all ears.


Thanks
Stefan

-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525




More information about the Pharo-project mailing list