[vwnc] Cairo graphics contd

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

[vwnc] Cairo graphics contd

Mark Plas

Joachim, Travis, thanks for your answers.

 

I’ve in the mean time loaded Cairo, Pango, Ditto & Gizmo and when I run some of the examples they crash on MNU #fromPangoScale and #third.

 

Do you know of another package I have to load?

 

Next to that, I’ve tried the ‘SelectionExample’ in Gizmo which produces a very nice transparent selection rectangle with an animated border. But it is also *terribly slow*! When I click and drag the mouse from the top left corner of the window to the bottom right it takes about 60(!) seconds to complete the entire operation. The window’s extent 700x700 pixels.

 

Is this normal?

 

Thanks,

Mark


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

Re: [vwnc] Cairo graphics contd

Travis Griggs-3

On Oct 28, 2008, at 1:16 AM, Mark Plas wrote:

> Joachim, Travis, thanks for your answers.
>
> I’ve in the mean time loaded Cairo, Pango, Ditto & Gizmo and when I  
> run some of the examples they crash on MNU #fromPangoScale and #third.
>
> Do you know of another package I have to load?
>
> Next to that, I’ve tried the ‘SelectionExample’ in Gizmo which  
> produces a very nice transparent selection rectangle with an  
> animated border. But it is also *terribly slow*! When I click and  
> drag the mouse from the top left corner of the window to the bottom  
> right it takes about 60(!) seconds to complete the entire operation.  
> The window’s extent 700x700 pixels.
>
> Is this normal?

It is normal in the sense that many of these things were quick  
experiments/prototypes, are somewhat dated now, and represent early  
playing around.

--
Travis Griggs
Objologist
What's next, Intel Processors branded with "Apple Outside" stickers?



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

Re: [vwnc] Cairo graphics contd

Mark Plas
Hi Travis,

In case of the SelectionExample, since it was an early experiment, would you say that it can easily be made a lot faster? It looks very good and promising, but is really extremely slow. You wouldn't be able to use it in actual production code.

What is exactly the part making it slow? It's not the transparent rectangle I think, because when I don't draw it, it's still equally slow.

Thanks in advance,
Mark

-----Original Message-----
From: Travis Griggs [mailto:[hidden email]]
Sent: dinsdag 28 oktober 2008 16:14
To: Mark Plas
Cc: [hidden email]
Subject: Re: [vwnc] Cairo graphics contd


On Oct 28, 2008, at 1:16 AM, Mark Plas wrote:

> Joachim, Travis, thanks for your answers.
>
> I've in the mean time loaded Cairo, Pango, Ditto & Gizmo and when I
> run some of the examples they crash on MNU #fromPangoScale and #third.
>
> Do you know of another package I have to load?
>
> Next to that, I've tried the 'SelectionExample' in Gizmo which
> produces a very nice transparent selection rectangle with an
> animated border. But it is also *terribly slow*! When I click and
> drag the mouse from the top left corner of the window to the bottom
> right it takes about 60(!) seconds to complete the entire operation.
> The window's extent 700x700 pixels.
>
> Is this normal?

It is normal in the sense that many of these things were quick
experiments/prototypes, are somewhat dated now, and represent early
playing around.

--
Travis Griggs
Objologist
What's next, Intel Processors branded with "Apple Outside" stickers?



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

Re: [vwnc] Cairo graphics contd

Mike Hales
In reply to this post by Travis Griggs-3
But not normal to assume that the Cairo rendering is slow rather some other aspect of the demo.  I have a deployed application with lots of Cairo, including icons, pango text layouts, process trends, schematic drawings etc all rendered with Cairo and performance of Cairo has never been a problem for us.

Mike
 


It is normal in the sense that many of these things were quick
experiments/prototypes, are somewhat dated now, and represent early
playing around.

--
Travis Griggs
Objologist
What's next, Intel Processors branded with "Apple Outside" stickers?



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



--
Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com

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

Re: [vwnc] Cairo graphics contd

Michael Lucas-Smith-2
In reply to this post by Mark Plas
Mark Plas wrote:
> Hi Travis,
>
> In case of the SelectionExample, since it was an early experiment, would you say that it can easily be made a lot faster? It looks very good and promising, but is really extremely slow. You wouldn't be able to use it in actual production code.
>
> What is exactly the part making it slow? It's not the transparent rectangle I think, because when I don't draw it, it's still equally slow.
>
>  
There are limits to what you can do with software rendering. The larger
the redraw area, the slower it will run. How do you get around this
problem? You use the graphics card hardware functions for blending,
stenciling, etc. One of the easier ways to do that is to program with
OpenGL (for cross platform), but it is a pretty big departure from the
easy APIs you get with cairographics.

In theory, an opengl backend can added to cairographics, which would
mean you might be able to get the speed improvements as well as the
convenient apis.

Besides that, the best bet is to simply reduce the amount of drawing you
have to do, by caching things instead of redrawing everything like the
SelectionExample does. So yeah, there are definitely things that can be
done to SelectionExample to make it faster.

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

Re: [vwnc] Cairo graphics contd

Mark Plas
In reply to this post by Mike Hales

That’s good to know. I was fearing that, even though the graphics looked good, that they might not be useful in real life applications because of being too slow.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Mike Hales
Sent: dinsdag 28 oktober 2008 17:22
To: [hidden email]
Subject: Re: [vwnc] Cairo graphics contd

 

But not normal to assume that the Cairo rendering is slow rather some other aspect of the demo.  I have a deployed application with lots of Cairo, including icons, pango text layouts, process trends, schematic drawings etc all rendered with Cairo and performance of Cairo has never been a problem for us.

 

Mike

 

 

It is normal in the sense that many of these things were quick
experiments/prototypes, are somewhat dated now, and represent early
playing around.

--
Travis Griggs
Objologist
What's next, Intel Processors branded with "Apple Outside" stickers?



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




--
Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com


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

Re: [vwnc] Cairo graphics contd

Mark Plas
In reply to this post by Michael Lucas-Smith-2
Hi Michael,

On the Cairo website there are notes about 'glitz', a backend for Cairo using openGL for hardware acceleration. It seems to be in an experimental form, but it sounds promising.

I did some further experiments with the SelectionExample to see what's causing the delays. It seems that the rectangles&triangles that are drawn are the major bottleneck. There are only 20 in total being drawn, which doesn't sound like that much, so that's a bit strange. But even without those, when I resize the window to full screen, redrawing the transparent rectangle starts becoming noticeably sluggish, but a lot less than with the small shapes in the background.

Mark

-----Original Message-----
From: Michael Lucas-Smith [mailto:[hidden email]]
Sent: dinsdag 28 oktober 2008 18:08
To: Mark Plas
Cc: Travis Griggs; [hidden email]
Subject: Re: [vwnc] Cairo graphics contd

Mark Plas wrote:
> Hi Travis,
>
> In case of the SelectionExample, since it was an early experiment, would you say that it can easily be made a lot faster? It looks very good and promising, but is really extremely slow. You wouldn't be able to use it in actual production code.
>
> What is exactly the part making it slow? It's not the transparent rectangle I think, because when I don't draw it, it's still equally slow.
>
>
There are limits to what you can do with software rendering. The larger
the redraw area, the slower it will run. How do you get around this
problem? You use the graphics card hardware functions for blending,
stenciling, etc. One of the easier ways to do that is to program with
OpenGL (for cross platform), but it is a pretty big departure from the
easy APIs you get with cairographics.

In theory, an opengl backend can added to cairographics, which would
mean you might be able to get the speed improvements as well as the
convenient apis.

Besides that, the best bet is to simply reduce the amount of drawing you
have to do, by caching things instead of redrawing everything like the
SelectionExample does. So yeah, there are definitely things that can be
done to SelectionExample to make it faster.

Michael

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

Re: [vwnc] Cairo graphics contd

Steven Kelly
In reply to this post by Mark Plas

The Cairoized version of GF/ST is about twice as slow as without Cairo. I consider that reasonable, and it certainly doesn’t feel slow: you can drag objects around on the screen and they and the lines attach to them refresh at around the same speed as the LCD on my 4-year-old laptop.

 

I will publish the Cairoized stuff; it just probably won’t happen for several days, because the version of GF/ST we Cairoized is the one we use at MetaCase, not the one in the regular distribution. I’ll do my best to make something useful to the wider GF/ST community: probably just Cairoizing the base GF/ST, but if it’s easier I may try to push some of our GF/ST improvements over too. There seems to be more openness in Cincom at the moment to the idea of accepting improvements to GF/ST rather than restricting changes to only the clearest bug fixes. I suppose if you prefer just bug fixes now would be a good time to shout.

 

Steve

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Plas
Sent: 29 October 2008 09:46
To: Mike Hales; [hidden email]
Subject: Re: [vwnc] Cairo graphics contd

 

That’s good to know. I was fearing that, even though the graphics looked good, that they might not be useful in real life applications because of being too slow.

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Mike Hales
Sent: dinsdag 28 oktober 2008 17:22
To: [hidden email]
Subject: Re: [vwnc] Cairo graphics contd

 

But not normal to assume that the Cairo rendering is slow rather some other aspect of the demo.  I have a deployed application with lots of Cairo, including icons, pango text layouts, process trends, schematic drawings etc all rendered with Cairo and performance of Cairo has never been a problem for us.

 

Mike

 

 

It is normal in the sense that many of these things were quick
experiments/prototypes, are somewhat dated now, and represent early
playing around.

--
Travis Griggs
Objologist
What's next, Intel Processors branded with "Apple Outside" stickers?



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




--
Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com


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

Re: [vwnc] Cairo graphics contd

Travis Griggs-3

On Oct 29, 2008, at 3:59 AM, Steven Kelly wrote:

> The Cairoized version of GF/ST is about twice as slow as without  
> Cairo. I consider that reasonable, and it certainly doesn’t feel  
> slow: you can drag objects around on the screen and they and the  
> lines attach to them refresh at around the same speed as the LCD on  
> my 4-year-old laptop.
>
> I will publish the Cairoized stuff; it just probably won’t happen  
> for several days, because the version of GF/ST we Cairoized is the  
> one we use at MetaCase, not the one in the regular distribution.  
> I’ll do my best to make something useful to the wider GF/ST  
> community: probably just Cairoizing the base GF/ST, but if it’s  
> easier I may try to push some of our GF/ST improvements over too.  
> There seems to be more openness in Cincom at the moment to the idea  
> of accepting improvements to GF/ST rather than restricting changes  
> to only the clearest bug fixes. I suppose if you prefer just bug  
> fixes now would be a good time to shout.

Steven, thanks for the numbers. IMO, that's actually pretty  
impressive. I'm sure it could be made to go faster in some cases,  
because there's such an impedence mismatch between first the GF/ST <->  
VW stuff, and then we've added another layer. For example, using  
Cairo's groupWhile: to do the buffering. We're hitting the Cairo a lot  
constantly setting the paint and stroke width (usually redundantly).  
Given that you got AA graphics suddenly, the ability to do xparency,  
and arbitrary xformation, and we only spent an hour or so on it,  
that's quite cool to me.

--
Travis Griggs
Objologist
If you can't say "Did it First!", you'd better be able to say "Did it  
Better!"



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

Re: [vwnc] Cairo graphics contd

giorgiof
hi,
related to the more general GF/ST framework, well,I would like to have some of your improvements, not only bug fixes.

If that would be possible, thanks a lot.

BTW: Steve,  were you able to do cairorized GF/ST after just the small time you spent at the OOSPLA table with Travis? seems fantastic to me to!

ciao
Giorgio

On Wed, Oct 29, 2008 at 5:17 PM, Travis Griggs <[hidden email]> wrote:

On Oct 29, 2008, at 3:59 AM, Steven Kelly wrote:

> The Cairoized version of GF/ST is about twice as slow as without
> Cairo. I consider that reasonable, and it certainly doesn't feel
> slow: you can drag objects around on the screen and they and the
> lines attach to them refresh at around the same speed as the LCD on
> my 4-year-old laptop.
>
> I will publish the Cairoized stuff; it just probably won't happen
> for several days, because the version of GF/ST we Cairoized is the
> one we use at MetaCase, not the one in the regular distribution.
> I'll do my best to make something useful to the wider GF/ST
> community: probably just Cairoizing the base GF/ST, but if it's
> easier I may try to push some of our GF/ST improvements over too.
> There seems to be more openness in Cincom at the moment to the idea
> of accepting improvements to GF/ST rather than restricting changes
> to only the clearest bug fixes. I suppose if you prefer just bug
> fixes now would be a good time to shout.

Steven, thanks for the numbers. IMO, that's actually pretty
impressive. I'm sure it could be made to go faster in some cases,
because there's such an impedence mismatch between first the GF/ST <->
VW stuff, and then we've added another layer. For example, using
Cairo's groupWhile: to do the buffering. We're hitting the Cairo a lot
constantly setting the paint and stroke width (usually redundantly).
Given that you got AA graphics suddenly, the ability to do xparency,
and arbitrary xformation, and we only spent an hour or so on it,
that's quite cool to me.

--
Travis Griggs
Objologist
If you can't say "Did it First!", you'd better be able to say "Did it
Better!"



_______________________________________________
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