emacs-devel
[Top][All Lists]
Advanced

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

Re: request for review: Doing direct file I/O in Emacs Lisp


From: Richard Stallman
Subject: Re: request for review: Doing direct file I/O in Emacs Lisp
Date: Sat, 15 May 2004 14:33:53 -0400

    Below are the results of comparing write-region to the file-handle
    API.  This test used Eshell's builtin cat to write 21MB to another
    file.

      ~74s  save-buffer (the current method)
      ~82s  file-handle-write
     ~250s  write-region [with call to `message' disabled]
     ~318s  write-region

    It is interesting that write-region is by far the most inefficient,
    and that my file-handle API is not the fastest method.

Since save-buffer calls write-region, both the fastest and the slowest
method use write-region.  What is the difference between these two
methods?

I wonder if it has to do with whether a coding system is being
used, or whether a coding system is being detected automatically.

    However, the real slowdown is with start-process, as others mentioned.
    Here are the times for doing the same cat, but using the system's cat:

Sorry, I do not understand what that means.

     ~952s  file-handle-write
      ...s  save-buffer (the current method)

I can't understand what alternatives you have compared.
Could you please explain them more concretely?

start-process takes a certain amount of time, but it should be a fixed
amount, and less than a second.  How many times did you start a
process here?




reply via email to

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