作者: | 来源:互联网 | 2023-09-09 09:17
Imworkingonaprojectwhichmakessubstantialuseofcodegeneration.Someofthefilesitgenera
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.
我正在开发一个大量使用代码生成的项目。它生成的一些文件包含> 25万行代码。 VS(2K5)不能很好地应对,但R#(4.01)每两分钟左右就会抛出一个内存不足的异常。
Splitting them out into partial classes/separate files isn't an option in the immediate term, though it may be later.
将它们拆分为部分类/单独的文件在短期内不是一种选择,尽管可能会更晚。
Are there any clever IDE tricks to dealing with this?
有没有聪明的IDE技巧来处理这个?
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.
编辑:所以人们立即(非常明智地)说“没有一个大文件”,并建议将其分解为更小的文件。
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. :)
这很好,但是我正在进行一项时间限制的任务,看看并决定优化什么。我的问题是非常具体的“如何在没有痛苦的情况下查看IDE中的疯狂大文件”,而不是“如何重构项目”。出于问题的目的,请假设该文件是只读的。 :)
8 个解决方案