Diagnosing the cause is pretty tricky, but there are some things you can try, and if one of them seems to solve the issue, maybe you'll have found it.
- Close any other programs you have open
- Disable any devices you don't strictly use (bluetooth, wifi, network)
- Disable background services like anti-virus or backup software
- Kill any background processes you don't strictly need (often relating to things that show up in the system tray)
- Make sure your computer power settings are set for maximum performance rather than power-saving or similar