From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#29095: Bug: The '20a09de953f437109a098fa8c4d380663d921481' merge increased my Emacs configuration loading time from 9 s to 60 s Date: Sat, 04 Nov 2017 19:53:46 -0400 Message-ID: <87y3nl7g8l.fsf@users.sourceforge.net> References: <0899d792-c1fe-caa8-183e-298371d226a0@Alexander.Shukaev.name> <87h8ueaioy.fsf@users.sourceforge.net> <87zi858r9i.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1509839652 2871 195.159.176.226 (4 Nov 2017 23:54:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Nov 2017 23:54:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 29095@debbugs.gnu.org To: Alexander Shukaev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 05 00:54:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eB8GN-0000UK-Fc for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Nov 2017 00:54:07 +0100 Original-Received: from localhost ([::1]:42518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eB8GT-0002iI-Sy for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Nov 2017 19:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eB8GN-0002iD-MP for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2017 19:54:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eB8GI-000793-QF for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2017 19:54:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eB8GI-00078x-MS for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2017 19:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eB8GI-000550-De for bug-gnu-emacs@gnu.org; Sat, 04 Nov 2017 19:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Nov 2017 23:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 29095-submit@debbugs.gnu.org id=B29095.150983963719514 (code B ref 29095); Sat, 04 Nov 2017 23:54:02 +0000 Original-Received: (at 29095) by debbugs.gnu.org; 4 Nov 2017 23:53:57 +0000 Original-Received: from localhost ([127.0.0.1]:51059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eB8GD-00054g-5b for submit@debbugs.gnu.org; Sat, 04 Nov 2017 19:53:57 -0400 Original-Received: from mail-io0-f172.google.com ([209.85.223.172]:53329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eB8GA-00054O-V5 for 29095@debbugs.gnu.org; Sat, 04 Nov 2017 19:53:55 -0400 Original-Received: by mail-io0-f172.google.com with SMTP id 189so12179099iow.10 for <29095@debbugs.gnu.org>; Sat, 04 Nov 2017 16:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=l52bzoWoyM9tLCkjSTNZVrE40LC1xftZK+Yl5WlHA+o=; b=hjMQ7PgQ5NhH64XIKg8HLHgYEB5zlMnw8lixNKpiZtieA8uoreqV1PJ3+FWvalWQKy OEGcSqi/DN3ZbbuKSnaqYb7Vbrl4gvOVhpH5E4o4r+j7NVfbsWzcyhz1B455jJX9EeU0 NEWQVG1q2FE3UokNmo61lZCE1vIhgwtM+/7whNibMLRUhQkyO3QSih7wyvJFg+2O83uJ M9DIy4Tz2DEa5EK1iLA/mRMyq8lPvG+1++42Hqkzsik0GOLrkPhlhNmZJNWLCbuN2PjB bM/YP7f5n2a2EP8WQ1pnNl3MC8XOZgAIE0dE13UziRIbye7lUMaRotn9rxMJG10YmXwl IskA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=l52bzoWoyM9tLCkjSTNZVrE40LC1xftZK+Yl5WlHA+o=; b=KwIKAgeGAd88yYQNKy8ZUSmvXqNo/PWmKHGjYnBAzV7ar06QFL2K+IvCm4aydwdRNC 3mijlkEFoChvHU4f+hw92cEgrwxBhzci41EXV0QRnFv6j+kQUvAVooGyJG4WJjb523Uv AWDlGx7l7hOJjuURl8rCn5HGbv3b1cvoXg8toY13pO2tUc4wqp10+Qbr4yvC4y65vMrm 3nKPlwRSFEyyAOYrrgUqV/TQhxpTmC/eQ61kOp10WvBCcq1AOOg4TXiw13h7RREEsgMQ HuAWfFIC5LDrDIQb1VZkMWB74x2wKZc3mktNqQoOwCGH4duwHKGuhbVyaLHA2PUBQx5S wN8A== X-Gm-Message-State: AJaThX6zRE7lP+Q/7Buje3WI4eE5Ztvp0TnkFQPjMzruKeSFFzztIObb RxxeJ4zhtFUgAH+ujt8J8M0= X-Google-Smtp-Source: ABhQp+Sx01RW5WAkrzQnYd+JSL8Bf9f5YmOgTDgJjU9oufevdcR7L60ZofKhd2xZIFHcg/D8uGjtng== X-Received: by 10.107.12.164 with SMTP id 36mr14404112iom.191.1509839629335; Sat, 04 Nov 2017 16:53:49 -0700 (PDT) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 79sm2768835itu.7.2017.11.04.16.53.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Nov 2017 16:53:48 -0700 (PDT) In-Reply-To: (Alexander Shukaev's message of "Sun, 5 Nov 2017 00:28:15 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139454 Archived-At: Alexander Shukaev writes: >> What confuses me though, is how a 100ms delay is adding ~50s to your >> starup time?! Or are you just creating 500 frames on startup? > > Hah, of course not. So I took some additional time to investigate > where this comes from and in turned out to be very simple: > > (setq-default minibuffer-auto-raise t) > > causes this. I think this needs to be addressed. Either by > documenting this side effect or finding a better solution. Ah, so if I understand correctly, because of the minibuffer-auto-raise setting, every time a message is printed Emacs tries to make the frame visible, and because of x-wait-for-event-timeout, it waits for 100ms each time. So if you get around ~500 messages during startup, it would take about 50 seconds, thus explaining the increase you observed? Perhaps the thing to do is simply to disable x-wait-for-event-timeout if we end up hitting the timeout. Under most window managers the frame becomes visible much faster than 100ms anyway, as far as I know. > I figured out why this GC issue was happening. It's a bug with > `magit-filenotify' package, which I've already reported and found > workaround for. So apart from my concerns about > `minibuffer-auto-raise' and `x-wait-for-event-timeout', looks good so > far. Ah yes, I saw that. It looks like it's not actually a GC issue as such, but an (asynchronous) infinite loop that generates a lot of garbage (and hence work for the GC). https://github.com/ruediger/magit-filenotify/issues/20