[Seaside] Re: TableReport slow down

Sven Van Caekenberghe sven at stfx.eu
Sat Jan 2 09:13:28 UTC 2016


> On 02 Jan 2016, at 09:45, Johan Brichau <johan at inceptive.be> wrote:
> 
> 
>> On 02 Jan 2016, at 01:22, Sven Van Caekenberghe <sven at stfx.eu> wrote:
>> 
>> Johan's suggestion is an easy solution, but basically comes down to 'do not use anything outside Latin1 unless you HTML encode it', which is (1) quite limited (2) should not be your job.
> 
> No, that’s not what I am suggesting and there is absolutely no issue when adding widestrings to the Seaside document when generating. That is what I wanted to make sure when I asked Hilaire to report the issue on github. 
> As Hilaire points out himself (and your code snippets also demonstrate that), the issue is the string concatenation before you put the string on the Seaside document:
> 
> Time millisecondsToRun: [WAHtmlCanvas builder render: [ :html |
> 	1500 timesRepeat: [ html text: 'hello', '€' ] ]].
> 
> -> +- 3000ms on my machine
> 
> Time millisecondsToRun: [WAHtmlCanvas builder render: [ :html |
> 	1500 timesRepeat: [ html text: 'hello'; text: '€' ] ]].
> 
> -> +- 5ms on my machine
> 
> My suggestion is not to use the #printOn: method for rendering the object on a Seaside canvas, but rather implement a #renderOn: method that avoids concatenating the String and WideString instances.

That is an excellent summary of the issue, and a good solution indeed.

> cheers
> Johan
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list