From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#57367: [PATCH V2] Speed up em-smart Date: Thu, 8 Sep 2022 21:36:17 -0700 Message-ID: References: <87r10q6byc.fsf@gnus.org> <9257e0e5-232e-7e20-f4d1-385066c4337e@gmail.com> <87bkrtxzfj.fsf@gnus.org> <87ilm0x1ol.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4124"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57367@debbugs.gnu.org To: Morgan Smith , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 09 06:37:13 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 1oWVlQ-0000ts-Kl for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 06:37:12 +0200 Original-Received: from localhost ([::1]:59672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWVlP-0002Ku-7L for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Sep 2022 00:37:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWVlG-0002KG-Mk for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 00:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWVlG-0005XO-E3 for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 00:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWVlG-0000tT-2x for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2022 00:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Sep 2022 04:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57367 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo patch Original-Received: via spool by 57367-submit@debbugs.gnu.org id=B57367.16626981913400 (code B ref 57367); Fri, 09 Sep 2022 04:37:02 +0000 Original-Received: (at 57367) by debbugs.gnu.org; 9 Sep 2022 04:36:31 +0000 Original-Received: from localhost ([127.0.0.1]:60662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWVkl-0000sm-Fz for submit@debbugs.gnu.org; Fri, 09 Sep 2022 00:36:31 -0400 Original-Received: from mail-pj1-f43.google.com ([209.85.216.43]:54223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWVkf-0000sV-1X for 57367@debbugs.gnu.org; Fri, 09 Sep 2022 00:36:29 -0400 Original-Received: by mail-pj1-f43.google.com with SMTP id q3so430503pjg.3 for <57367@debbugs.gnu.org>; Thu, 08 Sep 2022 21:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:from:to:cc:subject :date; bh=upt5QZFo8D3dZDz5bXXFispcpbOS+C9LZ8a4Iw/nQdo=; b=EaZWtayoiJ953N/84WPS2+SWW5u9oii35MszcwmM6l5OGXg2pkD4jsroP8FnHbLsw5 puHz3o0Eqprk8s7XIVmzFAGHypij8Vhn1kI66KJQ3eVt6N24RV9Ko8jZzQQW/jcO3Nk5 57Tlp9YNxay/nVhuyD+6MistCSoUFAD8OGy1nchmiF+o0DZdA1fqaBTXVf/BT5f8uBHg nWgbpCaoENL4FUbgQOECjbW9ggAFTxcuCpftU9xTjqzUFMCh7p3xdseYKUetJqDgF9bO T1YdWpbCV3L2y7vFtdfyHJs+7BTrafEtggI4RaTB2GegzlQt2pUAW/Ui/ZNInsPUKV8S HjUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:x-gm-message-state :from:to:cc:subject:date; bh=upt5QZFo8D3dZDz5bXXFispcpbOS+C9LZ8a4Iw/nQdo=; b=FAFblH2YFgf517BAa8vnIGhdYywrJrDX8Z1xiEcbtF8JJhlEzpFo6/WmF7uSevCeUo veh2jANYM58DTIMsgrZ50WPyW2eLO7c/CmsXAyLoV9wnNwbS9JhtgRGVX5I6dwk2hfhe WQ2lujtQ13y4Iq8JugPb4t6p/roY97F6DqbojjGFvWMgLEQ86nd+R+EB6ithFjFi5fdw YCBED8esV4AS/4tfKIvT03d9RFD37K/WF08XQt50svrlGv3HuMBlrGP/LaZnxfEGBKdZ ewexfy8DYnA7P17E7tE7I7QKIx6rI567fGZeX2elnf4pIDwIZffP3g51jTOrEpJ5FqES PXkA== X-Gm-Message-State: ACgBeo2kRrFyyIVHH99xdjI84nAoPxaZC2Lt+m5HfxzHXbGwztAe0r29 09kqBxCOye3VrMwubUll9MAiqptk6xE= X-Google-Smtp-Source: AA6agR7wyuneqBgUU4Z9Zpl0BMNdP6ZUfRtXcZ3gD6vOJvz3x0b1gnFllGOIabSCnfBN7bZlmvItZw== X-Received: by 2002:a17:90b:264a:b0:1fd:f88d:dbad with SMTP id pa10-20020a17090b264a00b001fdf88ddbadmr7806854pjb.93.1662698178980; Thu, 08 Sep 2022 21:36:18 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id lw2-20020a17090b180200b00200b12f2bf5sm10551091pjb.1.2022.09.08.21.36.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 21:36:17 -0700 (PDT) In-Reply-To: Content-Language: en-US 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:241953 Archived-At: On 9/6/2022 6:30 PM, Morgan Smith wrote: > I've attached my patch V2. > > This restores some more of the original logic that I have now realized > was indeed necessary. Again, this patch should not actually change > anything with respect to program logic, flow, or user experience. In my > limited testing, it seems to act just as it did before (but > significantly more performant). Thanks, this does indeed seem a lot faster. I do notice one small change in behavior though: after starting Eshell with the em-smart module loaded, run "echo hi" and then split the window vertically with 'C-x 2'. Before the patch, the window doesn't scroll. After the patch, the window is scrolled so that the "echo hi" block is at the top (i.e. the "Welcome to the Emacs shell" banner is hidden). The same sort of thing happens if you run a command with a lot of output first and then run "echo hi". Before splitting, the "echo hi" block is at the bottom. Without this patch, 'C-x 2' maintains that position (i.e. it scrolls the minimum amount of the previous command out of view so that you can see the most-recent command). With the patch, 'C-x 2' scrolls *all* of the previous command out of view, so the "echo hi" block is at the top. I think the pre-patch behavior is the most-usable: if you can fit all of the last command in the window, it should be at the bottom so that you can see (some of) the previous command. (I also saw some strange issue with resizing the windows via the mouse, but I can't reproduce it anymore. If I can figure out how trigger this reliably, I'll send an update. Sorry that's not very helpful at present...)