Out of memory Exception

I was working on a large source file (which badly needs refactoring, but that shouldn't be the issue :)) It's 6000+ lines divided into multiple regions. The larghest chunck of code is made up by the inilialize zomponent function (3500 lines), mostly due to componentone proprtybags for their TrueDBGrid.

It might be a good idea to disable syntax highlighting for this function alltogether. Another option I'd love is for Syntax highlighting to disable (something like the "IE has detected a slow script") when it's taking too long.

After approximately one hour of working, updating multiple grids, debugging and some event handlers VS started spewing out OutOfMemoryExceptions. When looking at the taskmanager VS had 300Mb phys and 900Mb swap in use. Normally this is something like 100Mb phys, 150mb swap with the solution loaded.

Another thing I noticed is that hitting reformat code on a file of that size completely hangs VS for more than 15 minutes (and usually get's taskkilled by me long before that).

Jesse Houwing

2 comments
Comment actions Permalink

It might be a good idea to disable syntax highlighting for this function
alltogether. Another option I'd love is for Syntax highlighting to disable
(something like the "IE has detected a slow script") when it's taking too
long.


You can press Ctrl-8 on that file. Error highlighting for that specific file
will be disabled

Another thing I noticed is that hitting reformat code on a file of that
size completely hangs VS for more than 15 minutes (and usually get's
taskkilled by me long before that).


On reformat, did you checked the "optimize usings" or "shorten reference"
checkboxes?
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

>> It might be a good idea to disable syntax highlighting for this function
>> alltogether. Another option I'd love is for Syntax highlighting to disable
>> (something like the "IE has detected a slow script") when it's taking too
>> long.

You can press Ctrl-8 on that file. Error highlighting for that specific file
will be disabled


I'll try that!

>> Another thing I noticed is that hitting reformat code on a file of that
>> size completely hangs VS for more than 15 minutes (and usually get's
>> taskkilled by me long before that).

On reformat, did you checked the "optimize usings" or "shorten reference"
checkboxes?


Doesn't matter it just takes forever. I found that when selecting arrange modifier keywords a status screen appears telling me how much has been refactored already. It would be nice to show that at all times (currently it doesn't). Also an estimate in minutes:secs would be nice.

Jesse

0

Please sign in to leave a comment.