<div class="gmail_quote">On 10 September 2012 23:25, Vojtěch Polášek <span dir="ltr"><<a href="mailto:krecoun@gmail.com" target="_blank">krecoun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


while running == True:<br>
    for event in pygame.event.get():<br>
        if event.type == blahblahblah, #processing various events<br>
    blahblahblah, contiuing the code after events are analysed<br>
<br>
I am looking mainly for keyboard events. I notice a quite nonnegligible<br>
lag when running this under Windows XP, when compared to the same code<br>
on Ubuntu 12.04.<br></blockquote><div><br></div><div>I do not have WinXP available, but if you want the best help from this board you should post the *exact* code that you are running. I don't think anyone has ever complained of code lasting a page or so (although any more and it becomes a bit of a chore :P). It does help. How are you sure that it is pygame.event.get() that is lagging? Have you tried """</div>


<div>while True:</div><div>    for e in pygame.event.get(): pass</div><div>"""* or even "while True: pygame.event.get()"*? If you have not, would it not be something else? How are you measuring the lag and what type is it (late signals? program freezes?)?</div>


<div><br></div><div>*Obviously you need to add code that tells you whether it's on time, but I'm not sure how you're doing that currently.</div><div><br></div><div>I'm not saying this to be harsh and if I could I would look further into the question, but I am trying to ask what I would probably need to know if I did have a Windows installation.</div>


<div><br></div><div>Or it could be a known bug. Eh.</div></div>