[wxPython-users] Re: Improve performance
Robin Dunn
robin at alldunn.com
Mon Aug 21 09:28:52 PDT 2006
Franz Steinhaeusler wrote:
> On Sat, 19 Aug 2006 10:54:37 -0700, Robin Dunn <robin at alldunn.com> wrote:
>>> Could it be, that dc.DrawPolygon(P) and dc.DrawLine is so much slower,
>>> although there is only a thin wrapper about them?
>>> If I comment these to out, it is not much slower than the wxWidgets version.
>> There is some additional Python specific overhead in DrawPolygon where
>> it has to convert the Python sequence of values into a C array of
>> wxPoints, but other than that what you are seeing in general is probably
>> just the difference between Python and C++.
>
> That can explain it. This DrawPolygon is called so often, so
> some juggle with the data all the time, bevor the C++ code is called,
> could be the reason.
>
> Could it be possible, that (in theory) to make a binding so small
> as possible, without the overhead?
It might be able to be made a bit more efficient, but not a whole lot.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list