[Seaside] Re: TableReport slow down

Johan Brichau johan at inceptive.be
Sat Jan 2 08:45:33 UTC 2016

> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160102/bc2c6905/attachment.htm

More information about the seaside mailing list