From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#32932: 27.0.50; render bugs on macOS Mojave Date: Sat, 25 Jan 2020 12:44:01 +0000 Message-ID: <20200125124401.GB10529@breton.holly.idiocy.org> References: <20191111181622.GA60950@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2539"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 32932@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 25 13:45:14 2020 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 1ivKoL-0000bW-9e for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Jan 2020 13:45:13 +0100 Original-Received: from localhost ([::1]:53438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivKoK-00039n-1I for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Jan 2020 07:45:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54342) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivKoB-00039W-NG for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2020 07:45:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivKoA-0000gT-HO for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2020 07:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ivKoA-0000g1-BB for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2020 07:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ivKoA-0003fe-8W for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2020 07:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jan 2020 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32932 X-GNU-PR-Package: emacs Original-Received: via spool by 32932-submit@debbugs.gnu.org id=B32932.157995625314041 (code B ref 32932); Sat, 25 Jan 2020 12:45:02 +0000 Original-Received: (at 32932) by debbugs.gnu.org; 25 Jan 2020 12:44:13 +0000 Original-Received: from localhost ([127.0.0.1]:55066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivKnM-0003eO-Su for submit@debbugs.gnu.org; Sat, 25 Jan 2020 07:44:13 -0500 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:54130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivKnK-0003eB-Sd for 32932@debbugs.gnu.org; Sat, 25 Jan 2020 07:44:11 -0500 Original-Received: by mail-wm1-f45.google.com with SMTP id m24so2139820wmc.3 for <32932@debbugs.gnu.org>; Sat, 25 Jan 2020 04:44:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=YkjFW5MNJji/zz6V9mAZvqA7QMbgLqk241yOhmK62X0=; b=LgXPNSsa/TYDTarDxNboUopk2Tm+C638FGT80ubXQdFeLG2py4kn3T7ZjiuCZpoMkY NEISkCuFwcRUaQf7AINEOdTCWP7mXPgbsD9vVtMengNT8s7fzYZpsu1L0sFvKHYZPsOy XXgqFfBEgOXleH8sqeMVjuQ0mHITw5WZkz8PfTRtKxKsnzg0hIdwE1nc5oDn6L2dKj+U pm8O24WL6a+egzDK4cJMP1z2BSqDU4GBDQmtSln5nVE27vmIQHA29Ys4y23GE7Qm9XrF awTfRoVnggEcbQWurP6sBfgwQx6IGhHHAB4nzawXGVF1ZbwiFIUv7+ikvxLyG1ekv4DJ j8vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=YkjFW5MNJji/zz6V9mAZvqA7QMbgLqk241yOhmK62X0=; b=KEIt4p8R6asD2Jq/V6dRUOgo20KfBZjVUp2Ukn+x/ziRPjbtlVLtx2Gz0hiHT4Lxny Xvv688OKzsyOjI0aftcCdQcHm70QpvXXoM9b3bLqnwNCwKXtNK6eseChCUvfP7qMgazy sJ/o8qAMKMrzSgvBiVu/Jsjyr0VBJIjxtec9bE4OjL7FYUGJbgMABwPWsbqCX4PYwSl4 e/gtghDxe3TP96WLvHN4uJZLiNTzcSgVVw6FnORGFMh9vtt0/mbmo/BkVCo0y3l6GkCb fIo11/AoqwFdJAG3mFO7IyRbc3LMXlDg0CnLSbTpHqJLOnCrwMVEmNa89OTKkuGhuZb+ Zl4g== X-Gm-Message-State: APjAAAXeP45uOsZTji+JDXgUf0bganbA4qxfeS1GH7izrF3GREWvPAIA 8NlNMTw0S/wZEvNrckFaIso= X-Google-Smtp-Source: APXvYqwBa4+17JiA1NrLJ+v/Wnxu4rrNyQytfBHuIQXdxWrbwYgrRyxsLMSot61PV0uazuQbX6KOLA== X-Received: by 2002:a1c:9a8d:: with SMTP id c135mr4176197wme.183.1579956244872; Sat, 25 Jan 2020 04:44:04 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c952-042c-63d5-ffbd.holly.idiocy.org. [2001:8b0:3f8:8129:c952:42c:63d5:ffbd]) by smtp.gmail.com with ESMTPSA id x11sm10620848wmg.46.2020.01.25.04.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jan 2020 04:44:03 -0800 (PST) Content-Disposition: inline In-Reply-To: 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175266 Archived-At: On Tue, Nov 12, 2019 at 02:38:04PM +0000, Alan Third wrote: > On Tue, 12 Nov 2019, 13:28 Robert Pluim, wrote: > > > >>>>> On Mon, 11 Nov 2019 18:16:22 +0000, Alan Third said: > > > The main bit of the code is around the method > > > createDrawingBufferWithRect in nsterm.m. It’s a simple bitmap > > > and it’s very slow to draw to the screen (drawRect:). I think > > > that there are things that can be done with layers and CGLayers, > > > but I never managed to work out how it’s supposed to work, or if > > > it’s even plausible. I don’t know if AppKit can draw directly to > > > CGLayers. > > > > Question #1: How do you know itʼs slow? Iʼve been using it since this > > morning, and it seems ok. > > > > A couple of people tried it and found it slow. I run a fairly vanilla Emacs > and it looked ok to me, but if I full maximised it on my retina mac it was > visibly slower at things like scrolling than the current master branch. Hi Robert, I’d forgotten it was you who originally complained about the performance. I’ve been messing about with the branch and have been using this benchmark nabbed from one of Eli’s posts on emacs devel: (defun scroll-up-benchmark () (interactive) (let ((oldgc gcs-done) (oldtime (float-time))) (condition-case nil (while t (scroll-up) (redisplay)) (error (message "GCs: %d Elapsed time: %f seconds" (- gcs-done oldgc) (- (float-time) oldtime)))))) Maximised on my external 1920x1200 monitor the difference in that benchmark with xdisp.c between drawing to a bitmap and using the standard master branch is essentially nothing. Unfortunately using it maximised on my laptop’s retina screen results in a difference of something like 15 seconds (40 ‐> 55 ish). On the other hand that’s a worst case scenario and in interactive use it’s perfectly fine. So we have a trade off here of slower performance, which may or may not be an issue, against drawing anomalies. I’m beginning to feel it’s probably better to just get rid of the drawing issues and live with the performance hit. I know that for me the performance difference is not going to be noticeable at all. Do you have any thoughts on the matter? (As an aside, if people using old hardware with old versions of macOS find it slow we can easily set it to only use the backing buffer on macOS 10.14+ and everyone else can use the same process as GNUstep, which is the old pre‐Mojave drawing direct to the screen thing.) -- Alan Third