[Seaside] WARegistry performance
rebmekop at gmail.com
Sat Dec 13 22:35:40 UTC 2008
We've tested our seaside (2.8) application with ab  and found that
the performance decreases with repeated runs of the benchmark.
Ab creates a new session for every request, so we've looked into the
session handling code and found that WARegistry spends O(n)
time with housekeeping for every new session, where n is the number of
registered sessions. This means that creating n sessions rapidly
takes O(n^2) time.
SeasideRegistry-ul.3.mcz  contains an alternative approach which
needs O(n) time for n new sessions, amortized O(1) time for every
We use a LinkedDictionary, which is a combination of a dictionary and
a linked list. In the list handlers are sorted by expiration time.
a new session is created we unregister all the expired sessions, which
can be found at the beginning of the list. When a session is accessed
then we move it to the end of the list.
To try it out you need to load HashTable from  first.
counter_benchmark.pdf  contains some benchmarks created with
autobench . We used Seaside-2.8-578 one-click image. Set the
size to 100 in TcpListener. Some graphs can be found at .
What do you think?
Cheers, Levente and Balázs
 Apache HTTP server benchmarking tool:
 HashTable ss repo: http://www.squeaksource.com/ht.html
More information about the seaside