The reason this is lagging is because the image is being copied to the disk many more times than it needs to. The screen is updating at 60 fps. That means that even when you have fired one shot, it's saving the image to your hard disk 60 times a second. Once it has two shots it's saving the image 120 per second, and so on. You could move the save method to your event loop, so it only overwrites the image every time the mouse is clicked.