Closed ethemcemozkan closed 2 years ago
That's right. I should start thinking about this...
@1024jp Have you thinked about it? I think 200+ MB is unnecessary, but the abilty to open 20 MB file is required for Olympiad Informatics. Do you use persistent data structure(such as std::rope in C++) to save text? Do you display the content partially?
@1024jp Maybe you can add loading animation too while opening big files. It can help user by showing app is running normally
@1024jp Do you have any plans about this issue?
@ethemcemozkan The idea is good. However, it's actually pretty complicated. I suppose the major time-consuming process is not the file reading itself but UI drawing and layout calculation. And, therefore, I should be careful about adding animation, namely another drawing process.
Besides, CotEditor depends a lot on Apple's text handling system (TextKit), which is well-integrated with the macOS system but kind of black-box actually when you need to do advanced things, such as partial text display. I don't forget about this issue, but everything goes little by little.
CotEditor still struggles to open 20+ MB files. Any chance to fix that?
I also wish to see big files support, but even with small (2-3MB) SQL files, CotEditor takes 97-100% CPU for minutes. The problem is "Syntax highlighting" option which is on by default. If I turn it off then opening is fine. I think that this option should automatically turn off for files > 1MB.
Just for comparison TextWrangler (which still runs on Mojave) opens the same SQL files instantaneously even with syntax highlighting.
Hi, long time no see. But I have good news. Today I found the solution to reduce the time to syntax highlight drastically (ref. #1265). In addition, I also improve some other areas to reduce the time to open documents. In the next version, opening 20+ MB files becomes definitely easy, and 200+ MB files will also be able to open in a reasonable time (about 20-30 seconds on M1 Mac) without the rainbow cursor.
This change will be shipped with CotEditor 4.3.0, which will be released this summer.
I think good text editor should open big(200+mb) text files.