I have a wxTextCtrl and I need to put a very large string into it. (Like a 15 MB string) The only problem is it's very slow. Here is what I'm doing:
char * buff = ...
wxString data(buff, wxConvUTF8);
text->ChangeValue(data);
However, this is not the bottleneck. That occurrs as soon as the function this block of code is in returns. The whole app freezes for about 30 seconds. I tried wxYield right after ChangeValue and that causes the first few lines of the string to be displayed in the control but it still freezes after. How can I avoid this?
I must stress that ChangeValue returns almost instantaneously. The delay happens after this, probably in wxTextCtrl's internal message handlers or something.