TextCtrl performance for large files

I’ve been trying to speed up my program, which uses a TextCtrl, for
large files by getting rid of code using line numbers. However, it
seems that just using the get_range method is slowing down my program
for large files. I don’t know whether I’m doing something wrong or
there’s a way to access the text without significant slowing in large
files. If anyone can help, I’d very much appreciate it.

Ross Goodell