From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: aiken Newsgroups: gmane.emacs.bugs Subject: bug#24091: 24.5; High CPU usage at startup while hidden Date: Thu, 28 Jul 2016 18:43:38 +0100 Message-ID: References: <24533f31-9fc2-b38e-aaeb-561616cdf77f@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1469727876 27898 80.91.229.3 (28 Jul 2016 17:44:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 17:44:36 +0000 (UTC) To: npostavs@users.sourceforge.net, clement.pit@gmail.com, 24091@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 28 19:44:25 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bSpM8-0006zc-VC for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 19:44:25 +0200 Original-Received: from localhost ([::1]:54867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSpLz-0008Kq-Ng for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 13:44:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSpLs-0008Bs-AW for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:44:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSpLm-00039e-Kz for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:44:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSpLm-000399-HO for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bSpLm-0007A2-7g for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 13:44:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <24533f31-9fc2-b38e-aaeb-561616cdf77f@gmail.com> Resent-From: aiken Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jul 2016 17:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24091 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24091-submit@debbugs.gnu.org id=B24091.146972783127503 (code B ref 24091); Thu, 28 Jul 2016 17:44:02 +0000 Original-Received: (at 24091) by debbugs.gnu.org; 28 Jul 2016 17:43:51 +0000 Original-Received: from localhost ([127.0.0.1]:49535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSpLb-00079X-2E for submit@debbugs.gnu.org; Thu, 28 Jul 2016 13:43:51 -0400 Original-Received: from mail-wm0-f43.google.com ([74.125.82.43]:37576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSpLZ-00079H-HN for 24091@debbugs.gnu.org; Thu, 28 Jul 2016 13:43:49 -0400 Original-Received: by mail-wm0-f43.google.com with SMTP id i5so118813599wmg.0 for <24091@debbugs.gnu.org>; Thu, 28 Jul 2016 10:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=blmkVnB3ZXywWvS9qGDNjIofkYU3mCrgtclSAWEVgwI=; b=lAa4cGAvv7C9LJNKSC2w9LKsefmmSZaQYtX4AWIk9rsLgoqSMOIly9Z37UUe6A49MA 1NJaudbgmSt/B+xiHjQ0C7+wEuQcsNV7RldxeUcxvSM/w6G8bJn+fH6P14S0PiaUsnqN v9i1/8AaaBXtOGBNGVuW1Zppc5KlPTgGUUvrhR1O4BcXlO6v8prNdNde5FsDW2EV9rFd FJegXlb8ainP4pDJ1SLyU9hKgsBgOAAvjEoo4VbA6VYPnqdZqZCuzEwSjd2V6X/crhnO 5GMfXcjn0zjeU+PdP9RhpTBs1s4AsoZHlGhCl3TT0glhlPPQXm0uv+ItB/bKsDXraNC1 nxxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=blmkVnB3ZXywWvS9qGDNjIofkYU3mCrgtclSAWEVgwI=; b=ZxeKY8O8XgNbb8AqA6KAfQbnu/imVwOl1FxWuBDVvyNIAsdk5+kqvKMVTlr6erngAb YBMOzWciVdmpm76KB5xuXd9m4Da4tjIHQ/0aCicFCiXVUIfFWJCGlcCXkO2/xp10R460 qGiM7JttOwCOY0ih5YWUK/VRQmDmuZximkhUOapVqFoJ/5KBUY3SLTo0dAXC66ZnSJjI Ag6ldJumyH3KkZR+DhFVNckgf6In775Utnldq4Pmds4HISWZR3GKfzIakVvvsvUSSuj1 X7GamKVW9h37xn7xX5roopAY7C/342mEdZofOPZqfTvg9JjmLtY8Dwo/GnXu3pmoFWTI zvWw== X-Gm-Message-State: ALyK8tIwUAob9dl/2TcV81A0lNlIGPQaPqQeOipcgxvzOiJRYV3X08dPHwnrXpw5UUXcnw== X-Received: by 10.28.153.70 with SMTP id b67mr61409618wme.84.1469727823611; Thu, 28 Jul 2016 10:43:43 -0700 (PDT) Original-Received: from [192.168.0.9] (cpc91220-cmbg18-2-0-cust124.5-4.cable.virginm.net. [81.104.142.125]) by smtp.googlemail.com with ESMTPSA id t188sm13288684wme.19.2016.07.28.10.43.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 10:43:43 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 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:121638 Archived-At: Noam: I think my settings are fairly standard, but another way to reproduce the effect of Emacs launching in a workspace that you're not currently in (which seems to be the main issue) is to add something like "assign [class="Emacs24"] 9" to your i3 config. (I've tried this and it does reproduce the high CPU usage.) Clément: I still get the problem with `emacs -Q`. Some clarification about the problem: the high CPU usage starts while Emacs is launching on some other workspace, and stops as soon as I go to that workspace. I notice that, when I go to the Emacs workspace and see the Emacs window, Emacs hasn't actually loaded up fully (e.g. it hasn't loaded my init.el), and it only finishes a lot of its startup once I'm on that workspace. Anyway, since the problem stops as soon as I look at Emacs, the only way I know of running profiler-report for this purpose is by putting it in a command line option: `emacs -Q --eval "(profiler-start 'cpu)"`. So I've done this (see below for the report), but I'm pretty sure the profiler-start is only getting evaluated after I've moved to the Emacs workspace, i.e. after the problem has stopped. [profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ([nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 61 [and or and redisplay_internal\ \(C\ function\) nil nil nil nil nil nil nil nil nil nil nil nil] 4 [completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 24 [and or and redisplay_internal\ \(C\ function\) read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil] 3 [read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil] 37 [completion-basic-try-completion "#" "#" funcall completion--some completion--nth-completion completion-try-completion completion--do-completion completion--in-region-1 "#" apply "#" completion--in-region completion-in-region minibuffer-complete call-interactively] 5 [completion-pcm--all-completions "#" funcall completion-pcm--find-all-completions completion-pcm-try-completion "#" "#" funcall completion--some completion--nth-completion completion-try-completion completion--do-completion completion--in-region-1 "#" apply "#"] 4 [completion-emacs22-try-completion "#" "#" funcall completion--some completion--nth-completion completion-try-completion completion--do-completion completion--in-region-1 "#" apply "#" completion--in-region completion-in-region minibuffer-complete call-interactively] 4 [sit-for minibuffer-message completion--message completion--do-completion completion--in-region-1 "#" apply "#" completion--in-region completion-in-region minibuffer-complete call-interactively command-execute read-from-minibuffer completing-read-default completing-read] 2 [delete-backward-char call-interactively command-execute read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil] 1 [profiler-cpu-profile profiler-report-cpu profiler-report call-interactively command-execute execute-extended-command call-interactively command-execute nil nil nil nil nil nil nil nil] 14 [Automatic\ GC] 2)) (22426 16956 108810 96000) nil]