Tuesday, July 10, 2007

Delphi Tips And Tricks: Turn Off Code Folding

Every once in a while, like today, I'm working with some very large files (tlibimp generated Office files that are 85,000+ lines if you must know) and the editor is very slow. The first thing I do is narrow the problem down and submit a bug. But at the end of the day I need to get work done like all of you, so I turn off code folding, which brings us to today's Delphi tip. Press CTRL + Shift + K + O and the little icons in the gutter will go away and you'll get back some CPU time. Now this doesn't solve the entire problem, the parser is still being run in the background but the IDE is more usable.

Update: Currently the IDE defaults to a maximum of 10,000 regions. There is a regkey that controls the maximum number of region:


$(HKCU_BDS_ROOT)\Editor\Options

Make a REG_DWORD value called CppMaxStructureRegions and set it to whatever value you want.

No comments:

Post a Comment