From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41640: 28.0.50; shell startup very slow when init file is used Date: Fri, 05 Jun 2020 14:51:47 +0300 Message-ID: <838sh1bui4.fsf@gnu.org> References: <87d06e4jer.fsf@gmail.com> <83h7vqar34.fsf@gnu.org> <87mu5h3ofg.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="41052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jsynacek@redhat.com, 41640@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 05 13:56:50 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhAxt-000AaY-Ra for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 13:56:49 +0200 Original-Received: from localhost ([::1]:43528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhAxs-0001K9-QD for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 07:56:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhAuF-0002bx-EA for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 07:53:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhAuD-0000JZ-Oh for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 07:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhAuD-0001Jg-Mb for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 07:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jun 2020 11:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41640 X-GNU-PR-Package: emacs Original-Received: via spool by 41640-submit@debbugs.gnu.org id=B41640.15913579365003 (code B ref 41640); Fri, 05 Jun 2020 11:53:01 +0000 Original-Received: (at 41640) by debbugs.gnu.org; 5 Jun 2020 11:52:16 +0000 Original-Received: from localhost ([127.0.0.1]:48449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhAtT-0001Ic-Qi for submit@debbugs.gnu.org; Fri, 05 Jun 2020 07:52:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhAtI-0001Hw-TP for 41640@debbugs.gnu.org; Fri, 05 Jun 2020 07:52:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:32779) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhAtD-0008O9-IB; Fri, 05 Jun 2020 07:51:59 -0400 Original-Received: from [176.228.60.248] (port=3100 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jhAtD-0006W7-1O; Fri, 05 Jun 2020 07:51:59 -0400 In-Reply-To: <87mu5h3ofg.fsf@gmail.com> (message from Pip Cet on Fri, 05 Jun 2020 08:30:11 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181551 Archived-At: > From: Pip Cet > Cc: jsynacek@redhat.com, 41640@debbugs.gnu.org > Date: Fri, 05 Jun 2020 08:30:11 +0000 > > > The code and the comments don't say why we used sleep-for, which your > > patch removes. Did you succeed in understanding what was that for, > > and if so, can you describe that reason and the rationale for removing > > the sleep? > > I'll try. (According to git, this code has been here since 1990). Yes. But Jim Blandy, who clearly had some problem he tried to solve, didn't describe the problem itself, just the solution. > The code inserted the file contents of the startfile at (point-max) > in the comint *output* buffer. I believe the concern was that > insert-file-contents would accept process output, corrupting the > start file, and it's possible this may happen, at least with tramp > handlers. Therefore, to avoid the process output being sent back to > the process, I think the sleep-for was added as a way to ensure the > program was done displaying the prompt. So you are saying that the wait is there to allow us to receive the shell's prompt, so that the contents of start file don't mix with that prompt? If that is the reason, then I think your changes are indeed TRT. Thanks.