[Seaside] Re: TableReport slow down

jtuchel at objektfabrik.de jtuchel at objektfabrik.de
Sat Jan 2 10:04:08 UTC 2016


Hilaire,

Am 02.01.16 um 10:12 schrieb Hilaire:
> Le 02/01/2016 09:45, Johan Brichau a écrit :
>> 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.
>>
> Thanks for the tip it helps.
> However use of renderOn: will have some large implication on my 
> Seaside components. Each use case of this object in component need to 
> be rewritten to use only render:. I don't like much this idea, it 
> makes the written code less elegant and consistent.
since the behavior isn't consistent, I don't see why you should bother...

And just to make sure we're not sending you in the wrong direction: 
Johan surely doesn't suggest turning your model objects into 
WAComponents. You don't have to use #render:, and maybe you shouldn't 
even call the method anything like #render, just use some method that 
accepts a renderer as parameter and renders html onto it.

OTOH, speaking of the inspector: not sure about Pharo, but in VA there 
is #printOn: and #debugPrintOn:, so you could also choose to implement 
special behavior for inspecting/debugging purposes. This would probably 
not really solve the concatenation problem, so maybe not even a relevant 
note ;-)

On a side note: I have decided to not use printOn: for application 
purposes if ever possible for similar reasons since I use Seaside. Too 
often I had to implement different representation logic for the 
application and myself as the developer. Having to go through a horribly 
long list of senders of #printString, #printOn: and sometimes even 
#asString in order to decide whether it's one or the other several times 
was an exercise that asks for avoidance...

Joachim


-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

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


More information about the seaside mailing list