[cairo] Text Grid Performance

Gerdus van Zyl gerdusvanzyl at gmail.com
Wed Feb 6 13:28:02 PST 2008


I have written my use case in pyGTK and found out some interesting
things. First the GTK version is very fast. Secondly GTK seems to
update the screen in chunks, about 1/3 of the screen at a time. Which
would explain the perceived speed. I will try to do the same, if
anyone has any suggestions on this it would be appreciated.

Thank you,
Gerdus van Zyl

On Feb 6, 2008 5:37 PM, Gerdus van Zyl <gerdusvanzyl at gmail.com> wrote:
> Alternatively I need to only draw that part of the screen that can be
> done within the timeframe as in partial rendering. Does anyone have a
> design pattern for that?
>
> ~G
>
>
> On Feb 5, 2008 8:42 PM, Gerdus van Zyl <gerdusvanzyl at gmail.com> wrote:
> > Ok, thanks for the feedback. Firstly I am on windows (windowsXP),
> > 2.4ghz amd, ati radeon 9500. I am using the win32 backend.
> >
> > In the text-scroll.py program Owen attached I get: 100 frames in
> > 7480.99994659 ms, 13.3671969942 FPS, which is fairly consistent with
> > my previous results considering event handling/reflow overhead.
> >
> > The clip is a rectangle and so far I know device-pixel aligned (I
> > don't use scale and all x,y,width,height is int). Tested
> > identity_matrix but made no difference.
> >
> > Top functions by cumulative time is:
> > ncalls  tottime  percall  cumtime  percall filename:lineno(function)
> > 67    1.280    0.019   20.128    0.300 platformwin32c.py:384(OnPaint)
> > 67    0.399    0.006   18.848    0.281 uxpwindowapp.py:1219(event_paint)
> > 6466/66    2.674    0.000   16.366    0.248 uxpwindowapp.py:1038(_renderone)
> > 6334    6.415    0.001   10.892    0.002 uxbase.py:1079(showText)
> > 6334    0.717    0.000   13.226    0.002 uxlabel.py:15(renderctx)
> > The rendering flow in my program is OnPaint -> event_paint ->
> > _renderone(x250) -> renderctx -> showText. Which to my eye looks like
> > cairo being the bottleneck.
> >
> > Thanks.
> > ~Gerdus
> >
> >
> >
> > On Feb 5, 2008 7:49 PM, Vladimir Vukicevic <vladimir at pobox.com> wrote:
> > >
> > > On Feb 5, 2008, at 7:10 AM, Gerdus van Zyl wrote:
> > > >
> > > > My text rendering for each element is basically: save,clip,render text
> > > > using pango,restore
> > >
> > > Just off the top of my head -- is the clip a rectangle, and if so, is
> > > it device-pixel aligned?  If not, that could account for the
> > > performance that you're seeing.
> > >
> > >      - Vlad
> > >
> > >
> >
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: liststore1.py
Type: text/x-python
Size: 2264 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080206/6836dd52/attachment-0001.py 


More information about the cairo mailing list