[squeak-dev] Odd performance characteristics of symbol creation
Andres Valloud
avalloud at smalltalk.comcastbiz.net
Thu May 7 02:06:09 UTC 2009
I would change the symbol table from an open addressing weak set to a
hash bucketed weak set. Also, I'd take the opportunity to make sure the
symbol table is thread safe.
Adrian Lienhard wrote:
> Hi,
>
> We have a server application that, after some longer usage, becomes
> very slow. It turned out that this is because lots of symbols are
> created from strings (without holding onto them), which becomes slower
> and slower over time. This is easy to fix in our app, but I'd like to
> understand why Squeak has a problem with that.
>
> Using the following snipped, I produced the attached chart (Y axis is
> ms spent to create 5000 random symbols). You can nicely see the
> reoccurring pattern that grows over time.
>
> 1000 timesRepeat: [
> Transcript print: ([
> 5000 timesRepeat: [ (($a to: $x) atRandom asString , 'asdasd')
> asSymbol ] ] timeToRun); cr; flush. ]
>
>
>
> ------------------------------------------------------------------------
>
More information about the Squeak-dev
mailing list
|