ProcessEvents

I was playing with my main loop and calling ProcessEvents() 30 times a second. I then profiled my code and found that process events was taking up 40% of my processing time. Switching to the Tao Sdl library, and using the same setup, the processing of events only takes 1.5% of my processing time.

I am just mentioning it in case someone wanted to take a look to see why it is much slower. I'm fine with using the Sdl to create my main window and handle events.


Comments

The windows mouse driver is
posted by the Fiddler

The windows mouse driver is probably at fault, it is marshalling an enormous amount of data (and also happens to leak memory). I have rewritten the implementation for 0.3.14, so that shouldn't be an issue anymore.

I'll be working on more performance enhancements in the future, once the API is complete - right now I try to make sure there are no memory leaks, and that the code is stable, but only make changes for performance if something is criminally slow.

If you care about features and stability, relying on Sdl for window creation is a good move. One small request though: either compile your code with the x86 flag, or distribute both x86 and x86_64 versions with the correct native SDL.dll, otherwise your code won't run on 64bit platforms.

Good to know. Thanks!
posted by JTalton

Good to know. Thanks!