Re: [code] Enabling ta to edit large files

From: dmccunney <dennis.mccunney.att.gmail.com>
Date: Tue, 12 Jun 2018 17:59:01 -0400

On Tue, Jun 12, 2018 at 5:13 PM, Mitchell <m.att.foicica.com> wrote:

> Textadept loads the entire file into memory at once and then displays it.
> While this initial load may be slow, subsequent edits should not be (unless
> there are really long lines). Scintilla offers a way to load a file
> piece-meal, but Textadept does not take advantage of this.

The question I have is whether Nicholas want to *edit* the files, or
simply view the contents.

If he just wants to *view* them, TA may be the wrong tool for the job.

Under *nix, I use less as the viewer. It starts reading in the file,
and displays as soon as it has enough to fill a few screens. More is
loaded as needed as the user scrolls through the file. The fact that
it *doesn't* need to wait for the whole file to load makes if start
quickly. Less can handle multi-gigabyte files, and things like *nix
log files can get that big if not automatically pruned.

Less can call whatever is defined as $EDITOR to edit the file it is
viewing, but for huge log files, you are unlikely to want to.

This sounds like a case of wanting to use TA for *everything*, and I
understand the desire, but I'm not sure that's *possible*.

If TA *can* be patched to provide the performance of VSCode or Atom on
huge files, that's lovely, and turning on Scintilla's ability to load
files piecemeal may be a way to attain that, but I don't know what the
implications for overall performance might be.

> Scintilla uses a Gap buffer I think. I don't know much about it, but you may
> be able to find more by asking on the Scintilla mailing list[3].

I believe Scintilla does use the buffer gap technique. It seems to be
the most common approach on current editors.

> Cheers,
______
Dennis
https://plus.google.com/u/0/105128793974319004519

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 12 Jun 2018 - 17:59:01 EDT

This archive was generated by hypermail 2.2.0 : Wed 13 Jun 2018 - 06:51:19 EDT