[IPython-dev] [Enthought-Dev] [matplotlib-devel] Ctypes based prototype of PyOS_InputHook for wx 2.8 and 2.9
ellisonbg.net at gmail.com
Fri Jul 17 17:54:17 EDT 2009
Polling at 100Hz is a horrendous solution from a technical point of view.
> I typical have a dozen IPython instances opened, where I have been
> working a while ago, but not doing anything right now, because I am
> planning to come back to it. Having these all poll at a 100Hz wil keep my
> laptop hot, make it switch context all the time, and drain the battery.
> Adobe Flash works that way. I use it as seldom as possible.
I agree that polling is a non-optimal approach. But, until wx supports
monitoring stdin from within the event loop, we are stuck with polling.
Because of usage cases like yours, I think it is important that users be
able to tune these things. For example, slower polling intervals work just
fine for many things (like basic matplotlib plots) and have essentially 0
load of the CPU. It also depends on what type of compromises you are wlling
to make. If you don't mind slightly slower keyboard response, but you want
super fast GUI responses, then approach 2 will work great. Likewise, if you
don't mind slow GUI response, but want fast keyboard, then approach 3 is
best. Bottom line = we are into a position of compromise because of wx.
The good news is that I think we can offer users a very flexible way of
tuning all these things.
> One trick I play sometimes when I am developping software that needs to
> poll and cannot be event-driven, is to unable polling when there is
> activity, but turn it off when there is None. I am not sure how you can
> adapt the idea here, though.
I will think about this.
> Enthought-Dev mailing list
> Enthought-Dev at enthought.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev