this is really frustrating me. this problem occurs when I have a particularly large .cs file (one i'm working on at the moment has 6000 lines and many anonymous types).
I will copy a line or a part of text, and sometimes after copying several things to the clipboard, or sometimes even after the first copy, vs CPU usage shoots up to 50% and the IDE freezes for anything up to a minute, maybe longer. pasting happens immediately, no freezing.
if i end the devenv.exe task and restart it, usually the copying is good again for a couple of times until it starts freezing again.
i have a feeling the problem could be tied to intellisense trying to recalculate itself.. but why this happens when code is copied doesn't really make sense to me.
one thing i have found that if i copy text via the "select and drag & ctrl with the mouse" method, i avoid the problem. that is what led me to believe it may be something to do with the clipboard ring, or writing to the clipboard.
i have already tried:
i must stress this only seems to happen as the code files get large, which is also usually due to having many anonymous types in the code.
i'm using Win7 x64 with 3gb RAM, however i had this problem on vista x64 too.
also, and i mean this in the nicest possible way, please don't take the refactoring approach. i do a lot of database work with large data sets so the anonymous types need to be there. it's my opinion that no matter how someone writes their code, this functionality of VS should work properly without freezing the IDE.
try this within visual studio
tools --> options --> text editor --> C#
disable Auto list members and Parameter information.
I have C# source which has more than 10,000 lines in a file and it doesnt cause any problems. Maybe its because my laptop has 4GB ram..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With