To profile the creation and drawing, create a canvas and do a #fullDrawOn: onto it. Example: [ | morph canvas | morph := FTTableMorph new extent: 300@300; dataSource: (FTExampleDataSource elements: (Smalltalk allClassesAndTraits sorted: [ :a :b | a name < b name])); yourself. canvas := FormCanvas extent: morph fullBounds extent depth: Display depth. morph fullDrawOn: canvas ] timeProfile. Best regards, Henrik -----Original Message----- From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of Stephan Eggermont Sent: Sunday, November 22, 2015 9:16 PM To: pharo-users@lists.pharo.org Subject: Re: [Pharo-users] About profiling code On 22-11-15 20:42, Guillermo Polito wrote:
Out of the top of my head, doing it like that only profiles widget creation/install if I'm not mistaken. But not render time.
Because the doit is executed inside the event processing of the morphic render loop. But a cool ui profiling should also measure the drawOn: methods.
I don't know if there is a tool to do that right know but it would be possible...
Thierry explained: Show halos on a Morph, inspect morph, DoIt [self fullDrawOn: Display getCanvas] timeProfile in the inspector. I've noticed very large differences in where time is spend (and not just the first time when all default values still need to be calculated). Stephan