help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: `start-process' awfully slow


From: Stefan Monnier
Subject: Re: `start-process' awfully slow
Date: Sun, 14 Apr 2013 14:24:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> As mentioned above, when `call-process' is used, it takes 2 seconds
> for Clang to generate 15,000 lines of completion results and then the
> results gets received by Emacs in a temporary buffer. 2 seconds is
> painful but still OK.

Which part of those 2 seconds is due to clang, and which part to Emacs?

> Because of the slowness, I tried to add the functionality to be able
> to call Clang asynchronously so that the keyboard input will not be
> blocked while awaiting the completion results. What had driven me
> crazy is that it takes more than 15 seconds for Emacs to receive the
> 15,000 lines of completion results if `start-process' is is being used
> to call the Clang executable. During this 15 seconds I was not typing
> anything so Emacs is "idling". The question is why `start-process'
> takes 15 seconds while `call-process' takes only 2 seconds, and what
> can I do about it?

There's no doubt that start-process has to work harder than
call-process, but 13s to transfer 15K lines (I assume those lines aren't
terribly long, so we might be talking about less than 1MB of data) is
too long.  I suggest you report it as a bug (via M-x report-emacs-bug),
trying to provide as much info as possible to make it reproducible
(e.g. replacing clang with a "cat" that simply outputs those 15K lines).


        Stefan



reply via email to

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