all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Insight into the mystery hangs
@ 2024-02-11 21:37 Eric S. Raymond
  2024-02-12 12:38 ` Alan Mackenzie
  2024-02-12 12:52 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Eric S. Raymond @ 2024-02-11 21:37 UTC (permalink / raw)
  To: emacs-devel

I finally beat Emacs into giving me a debug trace from one of the
mode-initialization hangs I described in previous email.  I know
what's going on with at least a subset of them now.

At the top of the stack trace was a call-process to "src status -a".
Turns out it was VC-mode doing this, trying to get the version-control
status of the file being visited. Both hangs I've seen were files I
keep under SRC control.

For those of you unfamiliar, SRC is a little version-control system I
wrote for single-file, single-developer projects - things like config
files that you want to track modifications on without mingling the
history with thst of other files, even other files in the same
directory.  It's directly supported in VC because I wrote that
support.

When I saw that trace, I thought SRC was hanging and I had a serious
bug to trace. Turns out not - turns out src status was incautiously
recursing through every single file in my WWW directory looking for a
match to the path I was visiting. This was due to some recent
cghanges I made to make SRC behave more naturally in trees of
directories containing SRC-controlled files.

I made a two-line change to SRC to stop it from recursing into
directories that don't contain a .src, RCS, or SCCS directory (SRC can
work with all three of those - in particular, if you use it on an RCS
directory it behaves like RCS with a non-horrible UI).

With this change, src status on even very large directories is fast,
and the hang goes away.

However.  Emacs is not entirely off the hook here.  When I'm not under
deadline pressure I will file a bug with a title something like
"With debug-on-quit enabled, Emacs does not reliably raise a debug
trace on interrupt of call-process"

There's some kind of timing or window issue here. You have to get
lucky to get a debug trace - I didn't, previously, in dozens of tries.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

No matter how one approaches the figures, one is forced to the rather
startling conclusion that the use of firearms in crime was very much
less when there were no controls of any sort and when anyone,
convicted criminal or lunatic, could buy any type of firearm without
restriction.  Half a century of strict controls on pistols has ended,
perversely, with a far greater use of this weapon in crime than ever
before.
        -- Colin Greenwood, in the study "Firearms Control", 1972



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-13 23:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11 21:37 Insight into the mystery hangs Eric S. Raymond
2024-02-12 12:38 ` Alan Mackenzie
2024-02-12 12:52 ` Eli Zaretskii
2024-02-12 18:26   ` Eric S. Raymond
2024-02-12 19:22     ` Eli Zaretskii
2024-02-13  7:52   ` Kévin Le Gouguec
2024-02-13 12:56     ` Eli Zaretskii
2024-02-13 23:05       ` Kévin Le Gouguec

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.