When I am out in the workspace, my fps and inputs are just fine. However, when I go into scripts, my fps is lowered to around 15fps and all my inputs are delayed by about two seconds, which can get really bothersome, because I like instant feedback when I'm typing. The script I was trying to use specifically is only 22 lines so I don't think the number of lines is the issue.
The same thing was happening to me when i had the toolbox open. Check if that's open and close it to see if anything happens.