Hi Jules!
It seems, the TextComponent is not suitable for a large textual content (approximately more than 1 Mb). The bigger its content is the slower it performs. Especially, this is an issue if the text is going to be syntactically highlighted (even more work to do).
I suggest to develop a virtual TextComponent that works like ListBoxComponent manages its items. This text component is supposed to display only the visible portion of a text that is currently in the view. It should ask (call back) a user function to provide the necessary rows every time the component needs to display different rows of a text. The user defined callback function is supposed to get row numbers that need to be displayed. Another user callback function is intended to manage text changes every time the user moves out from the changed row. This function is supposed to take a row number and the text that row contains. Even more, maybe several callback functions to handle row insertions, row deletions, row changes etc.
This way a very large text files can be mapped or be read into memory or even rows can be read directly from a file when needed and handled with ease.
So, Jules, what do you think about that?