From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Performance bottleneck in ns_draw_fringe_bitmap Date: Mon, 5 Aug 2024 11:36:02 +0200 Message-ID: <6F6FA2C9-6582-4FC9-88FE-2450820B17D8@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28936"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ben Simms Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 05 11:36:37 2024 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 1sau8q-0007Lg-SV for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Aug 2024 11:36:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sau8T-0006tX-0T; Mon, 05 Aug 2024 05:36:13 -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 1sau8O-0006tM-7e for emacs-devel@gnu.org; Mon, 05 Aug 2024 05:36:08 -0400 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sau8M-0004lz-6p for emacs-devel@gnu.org; Mon, 05 Aug 2024 05:36:07 -0400 Original-Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52f04c29588so16500827e87.3 for ; Mon, 05 Aug 2024 02:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722850564; x=1723455364; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=3ZPG6/xy7/dbVE66FBy/9VZOXWDRRHbDqcuHhqVESvI=; b=CSWCYMyD/cTFf/A/ScML7bUrtspPYPdJmtp2MMDrROcZxgnh7XI1RdwpjQv06peR1T JOWdbgS2KS1XMnuplbJ61aybwF2BfF1SfmLvU9lVRPj5rSyYFnOJpP5K8I3NpwkVUsl4 jxsehPX6k2PpmQOMnQxPZECQZmuYyk/IxruYnQH00B0vDlXLNE2NxhdG+Gke2a8jbdqg zy5E+jB2b/oTeOzDSgTQ/V7MQaVcR5Uh3JpOkIradKKqDu09wXJn2W4btk/v7l7gO4lR oEYPbnbhkpSRSsvK8v3wlyJmDqnf1VJTClY39KYnpfncoZz3piT14kNZIZFpM1HTrLIy y9/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722850564; x=1723455364; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3ZPG6/xy7/dbVE66FBy/9VZOXWDRRHbDqcuHhqVESvI=; b=AWxNgl07jtxMNlKAnLAELRUu/rvxjAve2CQQpnTVhraofALbcBTfiMsjdGh6+CXUTT M8UzuF13VIoig8fijQoxShPIIVgN4O7IX5vx5tzFDdX8J06WHIjUWfW+OxJwI/eMXDnC Y5q7xBpa2Qn9yPIfvEcWVxl5RDbelOLVAzXzGHakm6Zm8Ovaqzj33UAsHmIqczKyYoyu p7fRSKrBbINmtUYcXZ6BMmqciX1HyC1+UttJ+Lr4iEyXT2DLhzznNV3EzUZES/O57PET MYAFwah7KBKFiETbEbkdwJDAd/hfhEB56O9/1nQl2KXq88xlBBuJx4TvPGDx5Cl7Aguv zUmA== X-Gm-Message-State: AOJu0YxCYrOGCmXvblK4B+6t/cFPTXk9y28M5GfnDrubUgQz9zJ1hvRT epyTQrntfdNQcbFSySl6zZtY2RydJYC71SvQH122+B2ttWxnZF9yJ98kyA== X-Google-Smtp-Source: AGHT+IEfb+Gqk4DMXoGUx+u2AdoVh6L7fKX/UxykNgWzU4RKKMPx1Hl7TwUPOnk0RBhYBbGYgJL5jQ== X-Received: by 2002:a05:6512:1388:b0:52c:8fd7:2252 with SMTP id 2adb3069b0e04-530bb39d8d5mr8000605e87.11.1722850563660; Mon, 05 Aug 2024 02:36:03 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-191-82.bredband.tele2.se. [188.150.191.82]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-530bba3cd40sm1054180e87.253.2024.08.05.02.36.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Aug 2024 02:36:03 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322355 Archived-At: 26 juni 2024 kl. 13.56 skrev Ben Simms : > I've noticed that ns_draw_fringe_bitmap is a fairly large performance = sink when using pixel scrolling (to the point of 99% of cpu time being = inside this function, with Emacs drawing at approx 5Hz). The slowness = here isn't as obvious when not pixel scrolling, presumably because Emacs = never tries to redraw at 60+Hz otherwise. Thank you, and sorry about the late reply. Your patch seems to speed up = your benchmark a bit on an x86 mac with an older macOS, but I haven't = done any profiling. Perhaps you should report this to bug-gnu-emacs for more focussed = treatment. (For reference: original message with patch archived at = https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg00900.html)