From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: igc, macOS avoiding signals Date: Sat, 28 Dec 2024 15:12:23 +0000 Message-ID: <87ldvzg7vi.fsf@protonmail.com> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Sean Devlin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 28 17:28:31 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 1tRZfz-00047I-5O for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Dec 2024 17:28:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRZfk-0007Mw-89; Sat, 28 Dec 2024 11:28:16 -0500 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 1tRYUU-0000Eg-S1 for emacs-devel@gnu.org; Sat, 28 Dec 2024 10:12:34 -0500 Original-Received: from mail-10631.protonmail.ch ([79.135.106.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRYUS-0002qz-JM for emacs-devel@gnu.org; Sat, 28 Dec 2024 10:12:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735398749; x=1735657949; bh=cT9ljJBKdc+2/R1uyZ32dstB1M9nMmi+HBiBjq046nY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=oCL+gCHR/HpeHd5L95YXtEjkQM/8BTqsYa5mpUgO1+kqBi6nVemDN7KQsSy40ojDx tkcPHfF+R2eCt8WSDxRRLREWLDyJxMXJlyLJwoTd/L+PMC9V1aiucKKTvpNjH9kc/b JE4PXFVGF+rsT81aVLbzbX7SVOY2SswM08igrb9SDnaSqPjsgTfqgr6PJbDDW3zQ/J n1gRKPOa3BMQ0YJ4XuSg+KsHbJXf6Lm7nm7pquY29RYao/1w4MQvEEAjrKIPGZ2iBm SeEMPYXz8EsCCYxD7Y+am7Ib7QroP3m/4jul/V/v/5OqAiAVcUvH00E3xJR3TxjeKo DzR06izxpelHA== In-Reply-To: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: af8c30029933f81bd6debca65ec078fcc2c295cf Received-SPF: pass client-ip=79.135.106.31; envelope-from=pipcet@protonmail.com; helo=mail-10631.protonmail.ch 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 28 Dec 2024 11:28:08 -0500 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:327275 Archived-At: "Sean Devlin" writes: >> Pip Cet writes: >> >> > Gerd M=C3=B6llmann writes: >> > >> >> This is about commit >> >> >> >> ceec5ace134081b64dbf46c4fb5702ef5209c5fd >> >> Avoid MPS being interrupted by signals >> >> >> >> I've been running with this for some days now, and must report that >> >> Emacs feels a _bit_ different here in interactive use, maybe one coul= d >> >> say not as smooth. (macOS, --without-ns, in my fork of Emacs, which i= s >> >> very recent master++). >> > >> > I think we should quantify that. Set a watchpoint on >> > igc_global->signals_pending, check how often we even set that, and how >> > often we call igc_maybe_quit, particularly if we were previously idle. >> > Maybe it's sufficient to call it again from the idle handler. >> > >> >> After reverting the commit, it's feeling smoother again. >> > >> > Entirely possible. Let's measure it. >> >> I'm sorry, but I pass. It's too time-consuming for me. Maybe someone >> else using macOS can do that. I just wanted to make you aware of this. > > I can take a stab at this. I=E2=80=99ve been running the scratch/igc bran= ch on macOS using the NS build. Thanks! > To be clear, I should make sure to include the above commit in my build? = Or should I not include it? I think we probably need to put instrumentation in the source code, so we gain some idea of how long signals are delayed for when we mark them pending. (I'm also noticing that igc_maybe_quit isn't called as much as I thought it would be. Maybe we need to call it explicitly when Emacs becomes idle?) I'll try to come up with a patch. Pip