Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Maarten Mostert-2
Hi Mark,

Do you manage to gain the 1000 factor similar to the Cairo Guys ????

@+Maarten,

==============================================================

> Message du 13/07/10 13:05
> De : "Benjamin Otte"
> A : [hidden email]
> Copie à : [hidden email]
> Objet : Re: [cairo] Fast text rendering
>
>
> On Tue, 2010-07-13 at 02:49 -0700, [hidden email] wrote:
> > Is there a good manual or book out there exclusively about cairo?
> >
> > I was irritated, that for the xlib surface I get about 170 frames per
> > second for a text matrix of 20 by 20 with two digits of text and
> > for the xgl surface I get less than 1 frame per second.
> >
> Yeah, a factor of 1000 is a usual performance difference between
> something that's optimized ok and something not optimized at all.
>
> What's do you mean with xgl surface btw?
>
> Benjamin
>
> --
> cairo mailing list
> [hidden email]
> http://lists.cairographics.org/mailman/listinfo/cairo
>
>



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Mark Plas
Hi Maarten,

I'm not sure what you mean with this?

I'm doing experiments with Cairo and it appears that its text displaying is about 7x slower than VW's (GDI) text rendering (not 1000 times slower as mentioned in the mail you forwarded). I just wanted to know if there are techniques to make it display text at the same speed as GDI.

It could be related to the double buffering because when I don't do that, it becomes 2x faster, but double buffering is required.

I tried things where I would cache string renderings onto an image and try to repeatedly use that one instead of #showText. It works and it's faster as long as you can reuse strings, but it would be easier if the text displaying would just have the same (or comparable) performance as GDI where I don't have to do the caching.

Of course, this problem only occurs in cases where I have to display lots of text like for instance in an Excel-like grid of data.

Travis told me that one of the points on his agenda would be to look at performance issues concerning Cairo/Pango.

Mark

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Maarten MOSTERT
Sent: dinsdag 13 juli 2010 22:43
To: VWNC
Subject: [vwnc] Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Hi Mark,

Do you manage to gain the 1000 factor similar to the Cairo Guys ????

@+Maarten,

==============================================================

> Message du 13/07/10 13:05
> De : "Benjamin Otte"
> A : [hidden email]
> Copie à : [hidden email]
> Objet : Re: [cairo] Fast text rendering
>
>
> On Tue, 2010-07-13 at 02:49 -0700, [hidden email] wrote:
> > Is there a good manual or book out there exclusively about cairo?
> >
> > I was irritated, that for the xlib surface I get about 170 frames per
> > second for a text matrix of 20 by 20 with two digits of text and
> > for the xgl surface I get less than 1 frame per second.
> >
> Yeah, a factor of 1000 is a usual performance difference between
> something that's optimized ok and something not optimized at all.
>
> What's do you mean with xgl surface btw?
>
> Benjamin
>
> --
> cairo mailing list
> [hidden email]
> http://lists.cairographics.org/mailman/listinfo/cairo
>
>



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Maarten Mostert-2
Hi Mark,

Le 14 juil. 2010 à 09:18, Mark Plas a écrit :

> Hi Maarten,
>
> I'm not sure what you mean with this?
>

The main thing I wanted to indicate you is to check out the Cairo discussion related to this subject (there are many).
The once I moved over where just the once that I spotted yesterday.

> I tried things where I would cache string renderings onto an image and try to repeatedly use that one instead of #showText. It works and it's faster as long as you can reuse strings, but it would be easier if the text displaying would just have the same (or comparable) performance as GDI where I don't have to do the caching.

Did you try to write your complete grid to a big Cairo image and show this as a whole ? ?

Regards,

@+Maarten,

PS.  Still disappointed that we lost.....




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Mark Plas
" Did you try to write your complete grid to a big Cairo image and show this as a whole ? ?"

--> yes, that's what I do with groupWhile: []

-----Original Message-----
From: Maarten Mostert [mailto:[hidden email]]
Sent: woensdag 14 juli 2010 9:44
To: Mark Plas
Cc: VWNC
Subject: Re: [vwnc] Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Hi Mark,

Le 14 juil. 2010 à 09:18, Mark Plas a écrit :

> Hi Maarten,
>
> I'm not sure what you mean with this?
>

The main thing I wanted to indicate you is to check out the Cairo discussion related to this subject (there are many).
The once I moved over where just the once that I spotted yesterday.

> I tried things where I would cache string renderings onto an image and try to repeatedly use that one instead of #showText. It works and it's faster as long as you can reuse strings, but it would be easier if the text displaying would just have the same (or comparable) performance as GDI where I don't have to do the caching.

Did you try to write your complete grid to a big Cairo image and show this as a whole ? ?

Regards,

@+Maarten,

PS.  Still disappointed that we lost.....




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering

Maarten Mostert-2
Hi Mark,

Within your groupWhile: [] you could do something like:

anImage := CairoGraphics.ImageSurface
format: CairoGraphics.CairoFormat argb32
extent: self bounds corner.

anImageCR := anImage context.
self renderBackgroundOn: anImageCR.
self draw: anImageCR.

aCR sourceSurface: anImage offset:( self bounds origin).

I use this to avoid the OSX bugs but didnt test if it is actually faster.

Regards,

@+Maarten,

> Message du 14/07/10 09:48
> De : "Mark Plas"
> A : "Maarten Mostert"
> Copie à : "VWNC"
> Objet : RE: [vwnc] Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering
>
>
> " Did you try to write your complete grid to a big Cairo image and show this as a whole ? ?"
>
> --> yes, that's what I do with groupWhile: []
>
> -----Original Message-----
> From: Maarten Mostert [mailto:[hidden email]]
> Sent: woensdag 14 juli 2010 9:44
> To: Mark Plas
> Cc: VWNC
> Subject: Re: [vwnc] Fwd: [cairo] Text display tuning question // tr: Re: [cairo] Fast text rendering
>
> Hi Mark,
>
> Le 14 juil. 2010 à 09:18, Mark Plas a écrit :
>
> > Hi Maarten,
> >
> > I'm not sure what you mean with this?
> >
>
> The main thing I wanted to indicate you is to check out the Cairo discussion related to this subject (there are
many).
> The once I moved over where just the once that I spotted yesterday.
>
> > I tried things where I would cache string renderings onto an image and try to repeatedly use that one instead of
#showText. It works and it's faster as long as you can reuse strings, but it would be easier if the text displaying
would just have the same (or comparable) performance as GDI where I don't have to do the caching.

>
> Did you try to write your complete grid to a big Cairo image and show this as a whole ? ?
>
> Regards,
>
> @+Maarten,
>
> PS. Still disappointed that we lost.....
>
>
>
>
>



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc