Re: Re: TableReport slow down

Sven Van Caekenberghe <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
> On 02 Jan 2016, at 09:45, Johan Brichau <[email protected]> wrote:
> 
> 
>> On 02 Jan 2016, at 01:22, Sven Van Caekenberghe <[email protected]> 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
> [email protected]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.