Re: Emacs and big files

Jason Rumney <[email protected]>
Newsgroups gmane.emacs.windows
Message-ID <[email protected]>
Renger van Nieuwkoop <[email protected]> writes:

> Is it possible to reduce this time? Perhaps is there x64-build of
> Emacs…

If you expect the file to be ASCII, or don't care about the encoding of
non-ASCII characters in it, find-file-literally should be faster than
other methods of reading the file.

I'm not sure whether reverting a file that was originally read by
find-file-literally automatically gets this speed advantage, or you may
need to do the reverting differently, using something like:

(defun my-revert-func ()
"Revert a literal file quickly"
       (interactive)
       (with-silent-modifications
              (delete-region (point-min) (point-max))
              (insert-file-contents-literally buffer-file-name)))


Disclaimer: No warranty for the above code.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.