On Mon, May 09, 2005 at 02:41:02PM +0100, Gustavo J. A. M. Carneiro wrote:
> On Mon, 2005-05-09 at 10:29 -0300, Johan Dahlin wrote:
> > >>Johan, Gustavo: would this be breaking the API in subtle ways, or is it
> > >>a nice addition to PyGTK? Let's get a bug on it if the former.
> > >>    
> > >>
> > >
> > >  In either case I don't like very much making the PyGTK API different
> > >from the GTK+ one.  Maybe there's a reason why only the pixel value is
> > >returned.  Perhaps GTK+ doesn't have RGB values at hand, and so looking
> > >them up involves an extra X server roundtrip.
> > >  
> > >
> > Can still be done lazily, if that turns out to be an issue.
> 
>   That's a good idea.  The problem is how to find out, on getattr, if
> the RGB values have already been fetched or not.  Where to store such
> state?

I'm fine with either fixing it in PyGTK or in GTK+, as long as it gets
done. I just think it makes us look bad if there is something we could
do to make the API less confusing and we say we won't do anything.

> > >  In any case, if such change made sense to PyGTK, it would also make
> > >sense to GTK+.  Therefore, we shouldn't try to bypass GTK+ policy to
> > >make this PyGTK-only; instead, we should just fix GTK+.
> > >  
> > >
> > Now you're just boring. PyGTK provides a lot of things which GTK+ 
> > doesn't, and never will.
> 
>   It's one thing to take advantage of the python language features not
> available.  Another thing is to make speed tradeoffs in pygtk different
> from gtk+.

If we can do lazy lookups, it /is/ taking advantage of Python language
features ;-)

> > >PS: for the same reason I don't like PyGTK treating string constants as
> > >valid atoms, as it encourages people not to intern atoms, thus
> > >introducing extra X server roundtrips; it makes no difference in win32,
> > >but try running X11 apps through a modem and you'll know what I mean.
>
> > Well, one could argue that in most cases it doesn't matter. And when it 
> > actually does it can easily be changed into an atom instead of a string.
> 
>   Actually I think in most cases it matters, and only in some rare cases
> it doesn't matter.

Is the overhead that bad? How many atoms do we exchange in constructing
an average window, say, the gedit main window?

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3376 0125
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to