chances are that if your code is really laggy, using else ifs vs. ifs wont really help. you're probably doing an inefficient calculation or something that takes a ridiculous amount of time, either in your onLoop() or onPaint(). also check that you're not getting any exceptions
if you want specific help, you'll need to post your source code.