[Mono-dev] mcs patch for default encoding
atsushi at ximian.com
Tue Aug 23 11:55:56 EDT 2005
I still personally don't like such almost-extraneous solution.
I actually made similar fix when I was trying to fix bug #75679
( http://bugzilla.ximian.com/show_bug.cgi?id=75679 ) but the code
ran pretty slower than as it is now.
So, the matters to solve are:
1) Should we read entire stream ahead of compilation as
Kornél suggested ?
2) Can we apply my patch except for the part that is
related default encoding part in driver.cs ?
3) Can we apply driver.cs patch that is related to
default encoding ?
Kornél Pál wrote:
> I've tried to compile a 2 GB size file using csc.exe: I got out of memory
> error. The I reduced the size to 500 MB but I still got out of memory.
> Finally I was able to compile a 200 MB file.
> I got error CS1034: Compiler limit exceeded: Line cannot exceed 2046
> So I added line breaks as well. And added // to the beginning of each line
> to add some non-whitespace chars just for fun and to test the compiler.:)
> The first non-ASCII character is very near to the end of the file. csc.exe
> compiled it correctly. UTF-8 and ACP as well. DétectEncoding was compiled
> correctly in both cases. I attached the test cases (about 200 MB each).
> So I think csc.exe parses the whole file to detect UTF-8 and has poor
> management in addition.:) Maybe it chaches the source file using it's own
> allocated memory.
More information about the Mono-devel-list