emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dired-do-find-regexp failure with latin-1 encoding


From: Dmitry Gutov
Subject: Re: dired-do-find-regexp failure with latin-1 encoding
Date: Sun, 29 Nov 2020 19:32:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 29.11.2020 19:18, Eli Zaretskii wrote:

That wouldn't be easy, but some script that performs conversion based on
file contents could work.

It could work in principle, but I think in practice it will not be
faster than doing everything in Emacs Lisp, because each file will
need to be read twice.

It will certainly be faster if the host if remote.

On a local machine, you might be right, but we'd have to benchmark to be sure.

If the calls to the conversion program are done in parallel to the subsequent searches, reading the file twice might not be a problem (with the benefit of a disk cache). And if rg itself performs the search faster than Emacs' regexp engine, that can also be a factor.

Depends on process spawning overhead, I suppose.

It would be brittle, unless that program actually reads the entire
file (which will be slow).

How does Emacs do it? Does it read until the end of the file?

No, just a small initial part of it.  That's one reason why the
results are not guaranteed to be correct.

But if we consider that approach good enough for Emacs, it should probably be good enough for doing a search from inside Emacs.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]