@rdipardo thanks for clarifying the Windows settings and the PR, it looks very useful. One question though, if I understand correctly the code in the PR creates a copy of the file content into a managed byte array. But the text data files can often be quite large, like 100MB, so then it would make a copy of 100MB right?
That would basically double the memory usage and add performance overhead every time the syntax highlighting is applied to a csv file.
Is there maybe a way to use the buffer_ptr directly, like in this stackoverflow answer? I know it’s “unsafe” code from the CLR perspective, as in using an unmanaged memory pointer, but it would probably perform better, so instead of:
string content = Marshal.PtrToStringAnsi(buffer_ptr, length);do something like
byte *byte_buffer = (byte *)buffer_ptr; for (var idx=0; idx < length;idx++) //etc.