Re: Re: TableReport slow down

"[email protected]" <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
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:[email protected]
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

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