Re: Large files on Windows?

Neil Hodgson <[email protected]> Tue, 21 Nov 2023 01:03:39 -0800 (PST)
Newsgroups gmane.editors.scite.general
Message-ID <[email protected]>
I have been able to reproduce the problem with right clicking to run SciTE.

To avoid wasting space on indexes like line start positions, Scintilla 
document objects are created as either normal (less than 2GB) or large and 
either with styles or without styles. To simplify implementation, documents 
can't switch between these modes once created.

The different behaviour experienced is because large files are 
interactively opened using multi-threading so SciTE remains responsive. 
However, when some other code requests a file be opened, that is performed 
synchronously so that subsequent commands (like go to line 876543 or 
highlight every "wittichii") will operate on the completely loaded file.

The different approaches also use different calls: multi-threaded checks 
the size and creates a large file mode document if needed; single threaded 
commonly reuses an existing normal size document. Thus the right-click menu 
is using a document object that is not capable of holding more than 2GB and 
it gets a litle confused.

One solution could be to force the multi-threaded loader for large files. 
The calling application could wait before asking SciTE to do more actions.

Another possibilty is for the single-threaded loader to check for large 
files and create a new large document object. The code for this is a bit 
complicated though.

Neil

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/64605ce8-bd1f-4ca4-85c1-cefc4f6db115n%40googlegroups.com.