all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Klein <dklein@bloombergREMOVETHISPART.com>
Subject: Re: 1st character change in file takes forever
Date: 22 Dec 2002 13:33:15 +0200	[thread overview]
Message-ID: <m0of7e70g4.fsf@bloombergREMOVETHISPART.com> (raw)
In-Reply-To: NqHL9.7$eB1.206@paloalto-snr1.gtei.net

Barry Margolin <barmar@genuity.net> writes:

> In article <m08yyodagg.fsf@bloombergREMOVETHISPART.com>,
> David Klein  <dklein@bloombergREMOVETHISPART.com> wrote:
> >When I first try to insert a character into a buffer that is
> >associated with a file on disk, the insert takes close to a minute!
> 
> During that first change, Emacs checks whether someone else has modified
> the file, and also checks for a lock file.  For some reason, these checks
> are taking a long time.  Try doing a system call trace to see what it's
> doing during that time.
> 

Assuming by "a system call trace" you meant the strace function, I did
the following:

> emacs junk1&
> strace -c -f -ff -o emacs_trace -q -r -t -T -p1238
(1238 was the pid of emacs. After running the strace command, I
 pressed the spacebar once in emacs. When it finally inserted the
 space into the buffer, I ^C'ed the strace).
> cat emacs_trace
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 98.46   12.598431          49    255963           read
  1.21    0.154380        5718        27           select
  0.13    0.016690          98       170           ioctl
  0.06    0.007652          93        82           sigreturn
  0.06    0.007152         170        42           SYS_174
  0.03    0.004175          66        63           alarm
  0.03    0.004048          92        44           fcntl
  0.02    0.002571         234        11           write
  0.00    0.000091           4        26           kill
  0.00    0.000070          70         1           symlink
  0.00    0.000068           3        27           getpid
  0.00    0.000038           3        13           gettimeofday
  0.00    0.000033          11         3         3 access
  0.00    0.000024          12         2         1 open
  0.00    0.000020          20         1           stat
  0.00    0.000011           4         3           SYS_175
  0.00    0.000008           8         1           close
  0.00    0.000004           4         1           lseek
------ ----------- ----------- --------- --------- ----------------
100.00   12.795466                256480         4 total


I have no idea how to continue, besides the fact that 255963 read
syscalls seems slightly on the high side for inserting a single
character. Any ideas how to continue?

-- 
Use of tools distinguishes Man from Beast. And UNIX users from WINDOZE lusers.

  reply	other threads:[~2002-12-22 11:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-17 13:46 1st character change in file takes forever David Klein
2002-12-17 15:30 ` Barry Margolin
2002-12-22 11:33   ` David Klein [this message]
2002-12-22 19:15     ` Michael Powe
2002-12-24  8:19       ` David Klein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0of7e70g4.fsf@bloombergREMOVETHISPART.com \
    --to=dklein@bloombergremovethispart.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.