[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Re: Bug ovverriding sizeHint
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2008-02-25 15:46:48
Message-ID: 200802251546.48660.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Monday 25 February 2008, Giovanni Bajo wrote:
> On 2/25/2008 3:28 PM, Phil Thompson wrote:
> > 2. Patching will have no effect if the virtual has already been invoked
> > (because there is an internal cache).
>
> Thanks for your change, but this is a showstopper for me, so I guess I
> will have to find a different solution. Specifically, I would also need
> to remove the attribute and readd it later, etc.
> (The GC issue also worries me, but I have not analyzed its implications
> in details).
>
> I'm mentioning because, if you are not comfortable with this change, you
> might want to simply back it out as I'm not going to excercise it.

I've already made a note to myself in the comments to consider removing the 
cache. It avoids a GIL acquire/release and an attribute lookup each time C++ 
invokes a virtual.

(I've just noticed that the GIL is acquired and released in the common case 
where there is no Python reimplementation - now fixed.)

You can experiment with disabling the cache if you want (just remove the call 
that sets the flag when the cache has been filled). I'd remove the cache if 
was proved not to be of significant benefit.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic