On Thu, Apr 5, 2018, 16:09 Henrik Sperre Johansen <
henrik.s.johan...@veloxit.no> wrote:

> HilaireFernandes wrote
> > After some more investigation, I think it is not the greated bottleneck.
> >
> > When I render points not as discs but as Square, Athens is happy. I
> > guess the Cairo way of doing this is very slow because its seems Cairo
> > does not come with dedicated disc rendering code, it must be render with
> > portion of arc, as far as I remember.
> >
> > If I prevent to render empty text label attached with each point, Athens
> > is even happier. Text font rendering through Athens seems to be slow.
> >
> > Hilaire
> >
> >
> > Le 04/04/2018 à 23:05, Hilaire a écrit :
> >> It reduces by 50% the time to execution. Need to check if this trick
> >> #1 and #2 are still needed at P7 time.
> >
> > --
> > Dr. Geo
> > http://drgeo.eu
>
> My notes after looking at the profile for a short while, if anyone feels
> the
> urge to optimize;
> UFFI:
>
> > 8.8% {11475ms}
> >
> CairoFreetypeFontRenderer>>convertString:len:ofFont:toGlyphs:numGlyphs:x:y:
> >   | 4.7% {6098ms} ExternalAddress>>packToArity:
> >   | 4.5% {5789ms} ExternalAddress>>pointerAutoRelease
> >   | 2.6% {3439ms} ExternalAddress>>unpackFromArity:
>
> The lifespan of arguments that need arity packing/unpacking is well known,
> rewriting to use explicit free should lessen the overhead somewhat.
>
> CAIRO:
>
> > 26.6% {34593ms} CairoFreetypeFontRenderer>>glyphsOf:from:to:
> >    | 12.2% {15842ms} CairoGlyphsArray class>>new:
>
> With this kind of overhead just to create the array to hold results, it
> might be worthwhile to use a buffer array (of sufficient size) for the
> primitive, and copyFrom:to: to return the actual glyphs...
>
> DRGEO:
>
> > 20.9% {27116ms} DrGPointMorph>>drawOnAthensCanvas:
> >    |16.7% {21720ms} AthensCairoCanvas(AthensCanvas)>>createPath:
>
> Storing the path in DrGPointMorph, rather than recreating for each draw:,
> should save alot of time.
>
>
> > 7.7% {9962ms} DrGTextMorph>>drawOnAthensCanvas:
> >   | 7.7% {9962ms} Form>>asAthensPaintOn:
>
> Same thing here, only storing the paint, rather than converting from form
> each draw.
>
This would also be beneficial to Roassal when zooming in and out of
vusualization with a ton of labels.

Phil

>
> Cheers,
> Henry
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>
>

Reply via email to