One possible cause might be this:
// inLen is the length of the buffer including trailing NUL if any: if the
// last 4 bytes of the buffer are all NULs, these functions are more
// efficient as they avoid copying the string, but otherwise a copy is made
// internally which could be quite bad for (very) long strings.
Of course the documentation doesn't have any mention of that, you have to dig through the headers to find it.
However, FileManager already adds 4 gratious null bytes to every loaded file to prevent some other crap wxWidgets string function from crashing in UTF-16/UTF-32 mode, so actually this situation should not be possible.
Maybe the string conversion function is counting them from the wrong location though, who knows? Even though copying 500 kB of data shouldn't take 15 seconds... but who knows, maybe they make 20,000 copies?