Check activity monitor, see if there's anything taking a high percentage of your CPU. If so, might want to let that task finish or kill it.
Also, I'd recommend using a wire for your internet connectivity. It will alleviate a bunch of potential issues with wireless, and make this problem easier to track down. If your desk or working area contains a lot of metal, it might make it hard for the signal to reach the iMac.
There should not be any issue with your machine being able to draw the mouse movements on the screen, so like
@rpmurray mentioned above, check for wireless interference, or try debugging with a wired mouse temporarily