[Top][All Lists]
[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: |
John Wiegley |
Subject: |
Re: request for review: Doing direct file I/O in Emacs Lisp |
Date: |
Sat, 15 May 2004 14:36:38 -0700 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (darwin) |
Richard Stallman <address@hidden> writes:
> Since save-buffer calls write-region, both the fastest and the
> slowest method use write-region. What is the difference between
> these two methods?
Hmm.. that IS curious. In the save-buffer case, I call
insert-and-inherit in a temp buffer thousands of times, then one call
to save-buffer. In the write-region case, I am calling write-region
thousands of times. I think the difference is the constant filesystem
access in the latter case.
> 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?
If I start a process with start-process (/usr/bin/cat) and redirect
its output to a file, it is far slower than if I simply output the
same data to a file (eshell/cat) -- even though the resulting "output"
in both cases is the same. Why is receiving output via a process
sentinel so slow?
> 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?
I am only starting the system cat once.
John
- Re: request for review: Doing direct file I/O in Emacs Lisp, (continued)
- Re: request for review: Doing direct file I/O in Emacs Lisp, John Wiegley, 2004/05/11
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/12
- Re: request for review: Doing direct file I/O in Emacs Lisp, Kai Grossjohann, 2004/05/13
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/14
- Re: request for review: Doing direct file I/O in Emacs Lisp, Kai Grossjohann, 2004/05/14
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/15
- Re: request for review: Doing direct file I/O in Emacs Lisp, Kai Grossjohann, 2004/05/15
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/16
- Re: request for review: Doing direct file I/O in Emacs Lisp, John Wiegley, 2004/05/14
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/15
- Re: request for review: Doing direct file I/O in Emacs Lisp,
John Wiegley <=
- Re: request for review: Doing direct file I/O in Emacs Lisp, David Kastrup, 2004/05/15
- Re: request for review: Doing direct file I/O in Emacs Lisp, Eli Zaretskii, 2004/05/16
- Re: request for review: Doing direct file I/O in Emacs Lisp, David Kastrup, 2004/05/16
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/17
- Re: request for review: Doing direct file I/O in Emacs Lisp, John Wiegley, 2004/05/13
- Re: request for review: Doing direct file I/O in Emacs Lisp, Richard Stallman, 2004/05/14