Tuesday, May 18, 2010

Slow down & Mouse Motion

After making a series of changes, the performance of the level editor was extremely sluggish. Button clicks took 20 seconds to occur. The cause of this slow down was the addition of handling mouse motion events. The mouse motion events are used to determine pane focus and draw the tile shadow on the edit pane. It turns out that any small movement in the mouse sends a flurry mouse motion events which are all FIFO buffered. With SDL there is a way to set keyboard event repeat rates, but not for mouse events. Currently looking for a creative solution. This makes the editor otherwise unusable.

No comments:

Post a Comment