Description: LibreOffice freezes and becomes unresponsive when opening a 10MB “.txt” file. We plan to use LibreOffice to write some novels and books. The novels are in Chinese format, and the file size is generally between 5 and 200MB. We have some books in our work that are high-resolution scanned PDFs exceeding 5GB. Steps to Reproduce: 1. Download and open https://archive.org/download/20240411_1320/%E6%83%85%E6%AC%B2%E8%B6%85%E5%B8%82.txt 2. Stuck and unresponsive 3. Actual Results: Download and open Expected Results: Edit large files quickly. Reproducible: Always User Profile Reset: Yes Additional Info: Solution Refer to MS filemapping maybe the libreoffice could use the MS filemapping https://learn.microsoft.com/en-us/windows/win32/memory/file-mapping Solution Refer to EmEditor. https://www.emeditor.com/text-editor-features/large-file-support/ EmEditor is built to handle files of any size. When you ask it to open a file over a certain size (you choose the size), EmEditor will automatically start using temporary disk space rather than clogging up your memory, unlike most other text editors, which try to keep the whole file in memory and ultimately fail. By default, EmEditor uses temporary files when it opens a file larger than 300 MB. You can check and edit this size in the Advanced tab of the Customize dialog box. If you open a file larger than this size, a few highlighting features are disabled, including multiple-line comments. Wrapping modes are also disabled for optimal speed. If you are opening a file larger than this size, make sure there is enough disk space in the temporary file folder. The default temporary folder is the system temporary folder, specified by the %TEMP% environment variable. You can override the temporary folder to any folder you would like, that has enough space available. EmEditor’s multithreaded design allows you to view documents during the opening of a large file. A status window appears during most time-consuming activities such as text editing, saving, searching, replacing, inserting and deleting, which allows you to monitor and cancel those activities at any time. Large File Controller The Large File Controller enables you to view and edit files larger than 16TB (64-bit version) by opening up one section of the file at a time. You can control which and how many bytes are opened, and view how much disk space is available. When you open a large file (that is – larger than the size you specify), EmEditor displays the Large File Controller by default. This feature helps EmEditor to quickly open and edit large files by opening up only a section of the file at a time, and you can control the whole process. The Large File Controller allows you monitor the entire file size, the amount of the file already opened, and the available disk space. Within the Large File Controller, you can stop the opening process by clicking the Stop button. After that, you can select which portion of the file you want to open by sliding the From, To, and/or the Size slides, and pressing Apply. Notice that the numbers you specify will be adjusted to the nearest new lines when opened, unless binary files are opened. You can also change the display unit between Bytes and Terabytes. After opening a portion of your file, editing and saving, the whole file will be saved as one file. If you don’t want the large file controller to appear during the opening process, you can go to the File tab of the Customize dialog box, and clear the “Displays Large File Controller when a large file is opened” check box. You can always open the large file controller by clicking “Large File Controller” on the View menu.
The flat text file being loaded has no real structure. And that has to be created and assigned as the text is filtered into ODF paragraphs and pages--that facet is rather expensive and frankly LibreOffice import to ODF is really not the best choice for editing/publishing large text files. Too much overhead. Under 1000 pages works just fine once parsed, but 9,000 pages is just too sluggish. EmEditor is a fine text editor, but so is GVim/Vi, or even emacs. While word processing support in Notepad++ or features of the BablePad editor seem more appropriate to purpose. So even if the filter process could be refined to improve filter import layout and pagination, would still have performance issues while trying to edit such oversized files. It is just the wrong format/tool for doing so.