Whenever I pasted some code in my aspx pages inside Visual Studio got this dialog:
To solve this, I just deleted all the files from this folder:
%USERPROFILE%\AppData\Local\Microsoft\WebSiteCache
Perhaps do a backup first (zip file etc).
Solution from here:
via Slow Visual Studio Performance … Solved! | Geocortex Blog.