PSO2-Aqua-Library icon indicating copy to clipboard operation
PSO2-Aqua-Library copied to clipboard

Optimize UTF-16 string read

Open dummycount opened this issue 1 year ago • 0 comments

Optimized ReadUTF16String() using code based on the example at https://learn.microsoft.com/en-us/dotnet/api/system.text.decoder.convert?view=net-8.0. This reduces the time to run ReferenceGenerator.ReadCMXText() from 48 seconds to under 1 second on my PC.

A similar change could probably be made to improve the other string read functions, but ReadUTF16String() was the only one I saw getting used a significant amount when reading CMX data, so I didn't change the others.

dummycount avatar Jul 21 '24 17:07 dummycount