[Seaside-dev] improving rendering performance (on Pharo)

Philippe Marschall philippe.marschall at gmail.com
Thu May 20 19:32:07 UTC 2010


Hi

While hacking on an encoding prototype I found a way to improve
Seaside rendering performance on Pharo. We spend quite a lot of time
in WAEncoder >> #nextPutAll:. I realized I could use the same trick we
use in for UTF-8 encoding. Most of the content we don't have to escape
so if we can quickly decide that we don't need to escape the contents
we can just do a #nextPutAll:. Pharo has a primitive for exactly this.

So how much is it worth? The somewhat synthetic Seaside Performance
Index goes through the roof (before [1] after [2]) and
WALotsLinksFunctionalTest goes from about 900ms to about 500 ms.

The code is in Grease-Core-pmm.38, Grease-Pharo-Core-pmm.20,
Seaside-Core-pmm.636. Right now the code is hacked in and has a slow
default fallback on GRPlatform. I believe I could make it a bit faster
for cases where only very little content needs to be escaped (think a
huge text block with a single & in the middle). The question is where
we go from here, in the end we pretty much have methods for escaping
XML and URL in platform with the current implementation on GRPlatform
as fallback.

 [1] http://imgur.com/FftPH.png
 [2] http://imgur.com/qlivp.png

Cheers
Philippe


More information about the seaside-dev mailing list