I'm trying to use Roslyn for modifying serializers code generated by svcutil.exe. basically, it contains several dozens medium classes, and two huge classes (reader and writer) that contains a function for every class in a very large schema, but nothing too crazy like very large strings or variable names. It works great for medium files (7MB), but when trying to parse a very large source file (50MB, ~600K lines), I'm getting an empty 'Members' collection for the CompilationUnitRoot. When turning on 'break on thrown exceptions' I see there's an InsufficientExecutionStackException thrown when loading the file. Is there any way around this?
When I inspect the CompilationUnitRoot, I see that FullSpan property is correctly set, but the Members, Attributes, and Usings collections are empty.
if some_cond() return; else if (some_other_cond())...