Renger van Nieuwkoop <ren...@vannieuwkoop.ch> 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.