title: How best to deal with gigantic source code files in Visual Studio
body: <p>I'm working on a project which makes substantial use of code generation. Some of the files it generates contain >0.25 million lines of code. VS (2K5) doesn't cope too badly, but R# (4.01) throws an out of memory exception every two minutes or so.</p>
  
  <p><strong>Splitting them out into partial classes/separate files isn't an option in the immediate term, though it may be later.</strong></p>
  
  <p>Are there any clever IDE tricks to dealing with this?</p>
  
  <p>EDIT: so people are immediately saying (very sensibly) 'don't have a file that big' and suggesting ways to break it out into smaller files.</p>
  
  <p>That's fine, but I'm on a time-boxed task taking a look around and deciding what to optimise. My problem is very specifically 'how to view an insanely big file in an IDE without pain', not 'how to refactor the project'. For purposes of the question please imagine the file is read-only. :)</p>