Large files
This section may contain incomplete, premature, or mistaken information, prone to change without notice.
Control page Control:feature:Large files
Introducing a 64-bit version brings an opportunity to open, edit and save very big files. Testing (using NVMe disk to avoid I/O skewing the results) has shown:
- 2GB file loaded in 6 seconds in ANSI version, using 2.5G of memory
- 12 seconds in Unicode version, using 4.5G of memory.
- 4GB file loaded in 12 seconds in ANSI version, using 5.0G of memory
- 26 seconds in Unicode version, using 9.0G of memory.
- 8GB file loaded in 20 seconds in ANSI version, using 10.0G of memory
- 50 seconds in Unicode version, using 18.0G of memory.
ANSI version of TED Notepad is best at opening files in the ANSI encoding. There is no conversion, very little analysis needed, and only the bare amount of processing. There was 25% memory overhead, used by internal structures: line index, keeping text in a tree structure to allow prompt editing, etc.
Unicode version of TED Notepad is best at opening files in the UTF-8 encoding; or in the Unicode encoding with BOM. The conversion of text is natural, only simple analysis is needed, and relatively low amount of processing necessary. The overhead is bigger however, because Unicode text always requires 2 bytes per character, even if the characters can be stored at 1 byte per character in UTF-8 encoding.
Therefore, when working with very large files, unless Unicode characters are present in the text, the ANSI version of TED Notepad provides clear advantages in both loading speed and memory usage. However, when Unicode characters are present in the text, and cannot be converted into local ANSI encoding, the ANSI version of TED Notepad cannot be used.
Tip: When using Unicode version of TED Notepad to open ANSI files, set the Default encoding: UTF-8 setting on the File page in the Settings dialog. This setting will allow UTF-8-compatible ANSI files (all ASCII-only files) to be loaded as UTF-8 files, noticeably speeding up the conversions. This is because a UTF-8 to Unicode conversion is a natural and fast operation, as opposed to an ANSI to Unicode conversion, which can be a lot slower. Note: TED Notepad can safely detect, whether the given ANSI file is actually UTF-8-compatible, and will only load it as UTF-8 file, if it can. It will fall back to ANSI to Unicode conversion, if the given file is not UTF-8-compatible.
Tip: When using ANSI version of TED Notepad to open ANSI files, set the Default encoding: ANSI setting on the File page in the Settings dialog to avoid unnecessary conversions.
Optimized tree text structure
TED Notepad utilizes special tree structure to keep the text promptly ready for editting. The tree can take a lot more than 8GB of text without slowing down the editor, including typing new text or scrolling around.