Thank you for the great software.
I will report on my friend's findings instead.
JavaScriptSerializer is limited to string length equivalent to UTF-8 2MiB by default.
It checks if the JSON string fits within JavaScriptSerializer.MaxJsonLength and throws an exception if it exceeds. (Default value is DefaultMaxJsonLength = 2097152)
https://referencesource.microsoft.com/#System.Web.Extensions/Script/Serialization/JavaScriptSerializer.cs,76352a505a3d40a3,references
When outputting a file, line break is added after braces and commas,
but if this process exceeds 2MiB, a "project file that could be saved but cannot be opened" is created.
|
public static bool SerializeToFile(DisasmProject proj, string pathName, |
|
out string errorMessage) { |
|
try { |
|
string serializedData = SerializableProjectFile1.SerializeProject(proj); |
|
if (ADD_CRLF) { |
|
// Add some line breaks. This looks awful, but it makes text diffs |
|
// much more useful. |
|
serializedData = TextUtil.NonQuoteReplace(serializedData, "{", "{\r\n"); |
|
serializedData = TextUtil.NonQuoteReplace(serializedData, "},", "},\r\n"); |
|
serializedData = TextUtil.NonQuoteReplace(serializedData, ",", ",\r\n"); |
|
} |
SourceGen can currently open and analyze files as large as 1MiB,
so adding tags and comments to the whole area is likely to hit the limit.
Thank you for the great software.
I will report on my friend's findings instead.
JavaScriptSerializeris limited to string length equivalent to UTF-8 2MiB by default.It checks if the JSON string fits within
JavaScriptSerializer.MaxJsonLengthand throws an exception if it exceeds. (Default value isDefaultMaxJsonLength = 2097152)https://referencesource.microsoft.com/#System.Web.Extensions/Script/Serialization/JavaScriptSerializer.cs,76352a505a3d40a3,references
When outputting a file, line break is added after braces and commas,
but if this process exceeds 2MiB, a "project file that could be saved but cannot be opened" is created.
6502bench/SourceGen/ProjectFile.cs
Lines 68 to 78 in 58d794f
SourceGen can currently open and analyze files as large as 1MiB,
so adding tags and comments to the whole area is likely to hit the limit.