rsdn / nemerle

Nemerle language. Main repository.
http://nemerle.org
Other
622 stars 89 forks source link

Remove GC.Collect() from Nemerle.Completion2.Engine.BuildTypesTreeImpl to prevent VS UI freezing #13312

Closed vasily-kirichenko closed 8 years ago

vasily-kirichenko commented 8 years ago

Editing code in large solutions like Nitra causes Visual Studio freezes while Nemerle language service is doing parsing and type checking. Each such check calls GC.Collect() for some unclear reason, which causes short (1-3 seconds) UI freezes all the time. This PR removes that GC.Collect() call. As far as I can see, the freezes has gone, devenv.exe working set stays at about 1.5GB, which is totally ok.

(also this PR adds UnsubscribeSourceChanged call to prevent (possible) memory leaks)