Gael,<br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Polling at 100Hz is a horrendous solution from a technical point of view.<br>
I typical have a dozen IPython instances opened, where I have been<br>
working a while ago, but not doing anything right now, because I am<br>
planning to come back to it. Having these all poll at a 100Hz wil keep my<br>
laptop hot, make it switch context all the time, and drain the battery.<br>
Adobe Flash works that way. I use it as seldom as possible.<br>
</blockquote><div><br>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.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
One trick I play sometimes when I am developping software that needs to<br>
poll and cannot be event-driven, is to unable polling when there is<br>
activity, but turn it off when there is None. I am not sure how you can<br>
adapt the idea here, though.<br>
</blockquote><div><br>I will think about this.<br><br>Cheers,<br><br>Brian<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Gaël<br>
<div><div></div><div class="h5">_______________________________________________<br>
Enthought-Dev mailing list<br>
<a href="mailto:Enthought-Dev@enthought.com">Enthought-Dev@enthought.com</a><br>
<a href="https://mail.enthought.com/mailman/listinfo/enthought-dev" target="_blank">https://mail.enthought.com/mailman/listinfo/enthought-dev</a><br>
</div></div></blockquote></div><br>