> I would say "premature" optimization :-) Was just wondering if there
> was some standard way to structure a graphics/gdi program. for
> example: Message maps suck! use XYZ or ABC instead.

My advice is that 'win32ui' is deprecated (along with the MFC it is built
on) - be sure to stick to win32gui/winxpgui if possible.  win32gui allows
you to have either a dispatch function or a message map - my thinking at the
time was that message maps are likely to be more convenient but not as
flexible - so just allow both!  They both suck in their own way :)  A
message map is likely to be faster, simply as less python code would be
executed per-message.

If GDI performance did become an issue, there is a simple optimization we
can make for hot GDI functions that can't possibly cause a message to be
sent (ie, don't release/acquire the GIL), but that is a bridge we can cross
should we ever face it.

Cheers,

Mark
 
> 
> ~GerdusVZ
> 
> On Feb 8, 2008 5:35 PM, Larry Bates <[EMAIL PROTECTED]> wrote:
> >
> > Gerdus van Zyl wrote:
> > > Hi
> > >
> > > Please find attached my program (please excuse the mess) that uses
> > > cairographics.org to draw on a win32 window using GDI. My question
> is:
> > > What is the best event handling/drawing loop that one can have in
> > > pywin32? Is for instance a message map faster or slower? I am new
> to
> > > the win32 api and don't know what is the best way to do things.
> > >
> > > Thank You,
> > > Gerdus van Zyl
> > >
> > >
> > > -------------------------------------------------------------------
> -----
> > >
> > > _______________________________________________
> > > python-win32 mailing list
> > > python-win32@python.org
> > > http://mail.python.org/mailman/listinfo/python-win32
> >
> > Do you have a performance problem or is this "premature"
> optimization?
> >
> > -Larry
> >
> >
> > _______________________________________________
> > python-win32 mailing list
> > python-win32@python.org
> > http://mail.python.org/mailman/listinfo/python-win32
> >
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to