From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#58634: Long delay with blank screen whilst loading desktop at emacs startup Date: Fri, 21 Oct 2022 12:09:37 -0700 Message-ID: References: <83edv3zud8.fsf@gnu.org> <837d0vyssv.fsf@gnu.org> <83czamy76j.fsf@gnu.org> <83zgdqwjca.fsf@gnu.org> <838rl9wh4m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000ebf4bf05eb902e58" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24434"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58634@debbugs.gnu.org, Juri Linkov To: Alan Mackenzie , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 21 21:48:45 2022 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 1oly0b-00069E-PB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Oct 2022 21:48:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olxyw-0001zr-Es; Fri, 21 Oct 2022 15:47:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olxPA-0004DU-5S for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2022 15:10:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olxP8-0001UW-DB for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2022 15:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olxP7-0003ih-RG for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2022 15:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Oct 2022 19:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58634 X-GNU-PR-Package: emacs Original-Received: via spool by 58634-submit@debbugs.gnu.org id=B58634.166637938714273 (code B ref 58634); Fri, 21 Oct 2022 19:10:01 +0000 Original-Received: (at 58634) by debbugs.gnu.org; 21 Oct 2022 19:09:47 +0000 Original-Received: from localhost ([127.0.0.1]:39042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olxOt-0003i8-8f for submit@debbugs.gnu.org; Fri, 21 Oct 2022 15:09:47 -0400 Original-Received: from mail-oi1-f180.google.com ([209.85.167.180]:43584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olxOq-0003hu-Gn for 58634@debbugs.gnu.org; Fri, 21 Oct 2022 15:09:45 -0400 Original-Received: by mail-oi1-f180.google.com with SMTP id g10so4254222oif.10 for <58634@debbugs.gnu.org>; Fri, 21 Oct 2022 12:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=EcU1+hmfR9J3jAUOMwCxjdC0WN/zJU6dF696kx513+E=; b=SSlwRSC83G0lnmS4zHdRrGz1GCd+luo52/UBUadf96zvidBkzq49NdSBGvIc8s0tCC 7vC2oMS8Kkx658eH8QYFjVm0/VwSKf02i2hSRep0LLW3wglcyzjEAPFHPjn4m3xNSx3T Pn+rR168Su2inuGUDMQOa1lJT+hXju281guNkLuk+1RGWVxTlSA9lUhfVVy+tNDXJL57 c+SvooOF6pkqiEDj9LMhjjvD2Sa+0Gbv27Amxl3y6NJFwIFOOOZlzzzQgTPn/GPg7yN3 FxyunfyF45aUFw6NPL745ruEm6u3wx0V72Kk8tE57fMQBp7MOpOwDGi4t8fM0CpZxKO9 WwRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EcU1+hmfR9J3jAUOMwCxjdC0WN/zJU6dF696kx513+E=; b=NV4fuUYTuyK90NpE24o4poIQsQlWVOl4eZDPbBY/rpRjxcA9RFWgvbBbWq34uxaIyR gh4BC4EdWtkO4D/BsOrlCP/DHDnx9hENJzswN8uc/uS5vHEU/V8qkO4aY1kP34SxKFhT O1rRWZ9yqIVH1tOS+qmRhxog4zZ2LcjD9eDJknX9AmZZS4+9RsnxjqmzqO//UVVJrI5S ac0vlITp3de/v9tvTS2cANL2jq/hpXmIEQ8a8KkCCciATxxKD7UX6dv3f+EwUfkDQyeh Bsf/AO9qqiXRyt9Z2Xtpx2xR5yA/Z7hUSGhDWEAHOvsGAxFSpr0UmV1WsUrzwAFkUn5l rrsg== X-Gm-Message-State: ACrzQf0N1RLlwIHdRKe+I3+TUQOd6sTgm7AiJNqRWL7CsnXYwXDhsg43 yDiyORGOBb77WgYMrcyEtyjJGGa0apI9c/LN1dI= X-Google-Smtp-Source: AMsMyM42t3KxShz7pGsWLQrf+ABYxbssSSppTmPXDoj8UbJWPnEntdJNWqPV5N3co/2IhunOz9t83rnc1v/87b62vx8= X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id j6-20020a056808118600b00353b77aa481mr25308662oil.199.1666379378578; Fri, 21 Oct 2022 12:09:38 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 21 Oct 2022 12:09:37 -0700 In-Reply-To: X-Hashcash: 1:20:221021:acm@muc.de::q4Kk2nyB5npkNbAG:5Wtc 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246010 Archived-At: --000000000000ebf4bf05eb902e58 Content-Type: text/plain; charset="UTF-8" Alan Mackenzie writes: > My current idea is to count the buffers in desktop-save, and to output a > message: > > Restoring buffers: 127/166 > > as we restore the buffers. We already count the buffers as we load > them. Yes, this would be useful. It is bad to not see any progress while the desktop is loading, for several reasons. One of them is that you usually expect to see some kind of indication of progress during long-running operations. I wrote up some code to show such a counter myself about a year and a half ago, and I'm attaching the patch here in case it is of any help. Maybe you could take some inspiration from it Alan, or maybe not. I honestly can't remember why I didn't propose it back then. Maybe I felt like it should be possible to find a more elegant solution? I can't remember. In any case, if the patch still applies it should at the very least work, I hope. --000000000000ebf4bf05eb902e58 Content-Type: text/x-diff; charset="US-ASCII"; name="0001-New-option-to-show-progress-as-desktop-file-loads.patch" Content-Disposition: attachment; filename="0001-New-option-to-show-progress-as-desktop-file-loads.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 5f7ee616c22cfdb7_0.1 RnJvbSBlYjk0YjU1OThiMTAyMjkwY2NjZjZhZWU3MDE4MjEwMGU4NjFkZmY1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5rYW5nYXNAZ21haWwuY29t PgpEYXRlOiBTdW4sIDI2IEphbiAyMDIwIDA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