From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akira Kyle Newsgroups: gmane.emacs.devel Subject: Re: Rethinking the design of xwidgets Date: Wed, 14 Oct 2020 13:10:59 -0600 Message-ID: <86k0vsbp30.fsf@akirakyle.com> References: <864kmzupp0.fsf@akirakyle.com> <835z7e2ouj.fsf@gnu.org> <86v9fet5sg.fsf@akirakyle.com> <83imbe1040.fsf@gnu.org> <86pn5luak4.fsf@akirakyle.com> <83362g27y6.fsf@gnu.org> <86pn5kbs0l.fsf@akirakyle.com> <83zh4oy7yy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12082"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 28.0.50 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 14 21:12:59 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kSmCp-000326-BG for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 21:12:59 +0200 Original-Received: from localhost ([::1]:34736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSmCo-0002mr-CR for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Oct 2020 15:12:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSmB1-0002DX-L2 for emacs-devel@gnu.org; Wed, 14 Oct 2020 15:11:07 -0400 Original-Received: from mail-io1-f49.google.com ([209.85.166.49]:34277) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSmAw-0000Ul-V5; Wed, 14 Oct 2020 15:11:07 -0400 Original-Received: by mail-io1-f49.google.com with SMTP id m17so446850ioo.1; Wed, 14 Oct 2020 12:11:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=/MCN6KEloIvG6GliOcucXFPbTLSrn12UB2MRZwwPNkQ=; b=OEeHa6S07MB+H4CjtMLpdHZS1XvG74rU6PLb3qTQSj/MPd7Uf21gaTIXUjsoig6DRy m/ogeP7+mrWlv+QSGIlJdDV7ugLmC9fRNdkhMvn9QyqsBThVk4lARujLg+f42LeAQnjr iCmr/pvyJLxuKLItEWKASAaas3hfE2gEtuGhIOQSdIWxIERDW1kEsPn76PfxOZoq46R2 ZxPD8mDr39b+8zVnGkRujd/vtrnlGP19WBb/7n2nqoOLalYxX7WS8+PmgkaTOYoiLjx/ VVLEn65ASjx0eh0jOLuKaolNe7x7nJdypy0Q2pCGyGn1EtFMF26yxaWo+opfORKhKLJr GQlw== X-Gm-Message-State: AOAM53237mQWRo/9Yc4viKx01UK466FbFzu7hzRQmX5F4pEmcZi9NniB PmlW++JEDCdhQTfpb8G2ZHkLYEa1MMEsk65Z X-Google-Smtp-Source: ABdhPJxpigzbCEz+fQeBCRfhd4p7eGD5/w2IZTFkzJFNqNJW37WEowGE+rifeN6fLnz9C/j6oRKYOw== X-Received: by 2002:a05:6602:5ca:: with SMTP id w10mr739123iox.60.1602702661121; Wed, 14 Oct 2020 12:11:01 -0700 (PDT) Original-Received: from lore ([2601:281:8080:45f0:7f70:5415:b75f:2b9]) by smtp.gmail.com with ESMTPSA id d7sm230395ilr.31.2020.10.14.12.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 12:11:00 -0700 (PDT) In-reply-to: <83zh4oy7yy.fsf@gnu.org> Received-SPF: pass client-ip=209.85.166.49; envelope-from=aikokyle@gmail.com; helo=mail-io1-f49.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/14 15:11:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257677 Archived-At: On Wed, Oct 14, 2020 at 12:32 PM, Eli Zaretskii wrote: >> I see some redisplay tests in >> tests/manual/redisplay-testsuite.el >> and scroll-tests.el which seems like it would be a starting >> point >> for such a study? > > No, not necessarily. Those just test some tricky situations > where > there were bugs at some point. > > To find the set of tests to measure the effect of the > optimizations, > I'd suggest the following procedure: > > . For each of the optimizations, find a situation where each > that > optimizations gets executed. ("M-x trace-redisplay" can > help > here.) Then measure the performance with and without the > optimization (most of them can be inhibited by setting the > relevant inhibit-try-* variables; for the couple that > cannot, we > can add more such variables). > Note that some optimizations are in xdisp.c and some in > dispnew.c. > > . Each test case found above should be run with and without > variable-size fonts, with and without text properties > (font-lock), > and with and without lots of overlays. > > . Additional test cases can be constructed by benchmarking > scrolling > through a large buffer, again with and without the relevant > optimizations. > > I guess there's more, but the above can be a good starting > point, and > will produce enough data to analyze the current situation. Thanks for the outline of how to start on this project. I'll add it to my list of Emacs projects I'd like to work on whenever I have time to do so :) >> I am a user who frequently wishes redisplay was better which >> has >> partly motivated my interest in this. Between displaying long >> org >> mode documents with inline images and long lines of generated >> latex, >> I'll often see noticeable delay in basic buffer operations such >> as >> scrolling. This is also exacerbated by the fact that I'm doing >> all >> of this on a Pinebook Pro which is an arm aarch64 system >> comparable >> to the raspberry pi. In fact the only way Emacs has been >> generally >> usable for me on this laptop is with the native-comp branch. > > It is possible that a significant portion of the percepted > slowness is > due to Lisp that is run either via redisplay hooks or from > post-command-hook and suchlikes. To see who is the culprit, > profile > Emacs during such slow displays, and look at the percentage > taken by > redisplay_internal and vertical-motion, as opposed to other > functions. Sorry I should've been more precise. I'm sure much of the perceived slowness is due to lisp given how much native-comp improves the situation. My wishes for redisplay to be better are less performance related (expect for long lines which are are a real killer) and more functionality wise, hence the original proposal about xwidgets. I also think Emacs could handle scrolling variable height lines much better as when there are inline images in a buffer and generally handle being more aware about pixels rather than the character matrix positions that Emacs historically started out only caring about.