From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Allen Wang Newsgroups: gmane.emacs.bugs Subject: bug#60810: 30.0.50; `while-no-input' in GUI(macOS) is much slower than emacs -nw Date: Sun, 15 Jan 2023 12:48:59 -0800 Message-ID: References: <87bkn0bmuf.fsf@yahoo.com> <83358c6zry.fsf@gnu.org> <874jssb0e1.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a19abe05f2539030" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16184"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 60810@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 15 21:47:16 2023 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 1pH9uN-00041j-Q8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Jan 2023 21:47:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pH9uC-0003VZ-QL; Sun, 15 Jan 2023 15:47:04 -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 1pH9uA-0003VB-U8 for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 15:47:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pH9uA-0004mj-99 for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 15:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pH9u9-0000cL-RI for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 15:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Allen Wang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Jan 2023 20:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60810 X-GNU-PR-Package: emacs Original-Received: via spool by 60810-submit@debbugs.gnu.org id=B60810.16738156142361 (code B ref 60810); Sun, 15 Jan 2023 20:47:01 +0000 Original-Received: (at 60810) by debbugs.gnu.org; 15 Jan 2023 20:46:54 +0000 Original-Received: from localhost ([127.0.0.1]:59610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH9u2-0000c0-6R for submit@debbugs.gnu.org; Sun, 15 Jan 2023 15:46:54 -0500 Original-Received: from mail-ej1-f48.google.com ([209.85.218.48]:46816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH9u0-0000bm-E3 for 60810@debbugs.gnu.org; Sun, 15 Jan 2023 15:46:53 -0500 Original-Received: by mail-ej1-f48.google.com with SMTP id qx13so5422647ejb.13 for <60810@debbugs.gnu.org>; Sun, 15 Jan 2023 12:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gtcFbLs9KvZJh+q+XlD/PParV+2omC1ndrGls2vPSGI=; b=bldKFGAJCYknV4cPiKyNtqSUg0ZhHreaMUHjQUUCDddmePMbYPy9QLYOBOx1AqCIB3 9uJNSPUdG/Sb4xGQP5vE0mZkc6BZfTT6Kc7u8zqQ/lPnZ6ldKyEPTClrlfo1EQZ8KLYT 1+yuP65RwKEbTK2mfEsSh66qiHgJzHH8HyihEl1gtn2EDHIV4IxKVJWVinmxKPltfyYG oMctu+VlrYbd6QDrQh7CsKfpJcQZfgdxAKIazfFIexdX7dfKVHCR83d3MPc1TKiQdoXU SX/ckPJgeV7uwGo2NuFFy5udXvuS1eHZHbgroVh/5b7wKcpz4nW0PkKriNBZbxUd7/vm /wGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gtcFbLs9KvZJh+q+XlD/PParV+2omC1ndrGls2vPSGI=; b=69sqZJgJk/ZJNB7POibjSZGV4k5DKd/G7JyzHcZmPC0mNWJVW+UX2bKxcyCnqOf4gM NAwSChQdExBa3fREVpBsGLY86eBOp/G5dCgkk8ZQ2UqFM3K0ku1boVXwY2N46iQKziub xCwMVBpOSJXXVtF+FLqiU1rExEchnSuaLkvaHjW+jPHKexBlBGGAlAvyoFbixDB+xL0M DiE86wJD6tTyViUOn1ifY7efBNrt9Vguzeqw7Yy3Mbsw7ZxtWWx20ATCgL/XxU9evRTe noWU61qoE71Wca843CsGBmvxQh7Ke48/9ZgpuPDowxmK/hZxq34/DtpzcvtkwL01glhz ofNQ== X-Gm-Message-State: AFqh2koYSgaZGPXxt3ieUOg8zX3wllAQvuBBxpXpl1vNg1m35DRJasGk qCpSOXOjt4YhOdo0x1+k5zkwdn67B0NYcfvedVA= X-Google-Smtp-Source: AMrXdXvTUwLuA54PeVO01zu3SbZjnIXpdF0aBXj09L+lb7a2OMNkkpCqwDYkHmpqzO2WqYfzk34OjompfHVLJAk/9kM= X-Received: by 2002:a17:906:b850:b0:867:172b:c915 with SMTP id ga16-20020a170906b85000b00867172bc915mr1496643ejb.267.1673815606269; Sun, 15 Jan 2023 12:46:46 -0800 (PST) In-Reply-To: <874jssb0e1.fsf@yahoo.com> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253450 Archived-At: --000000000000a19abe05f2539030 Content-Type: text/plain; charset="UTF-8" Thank you for the quick response and the info. Sounds like this can't be fixed easily; I'll see if polling-period works for me. On Sun, Jan 15, 2023 at 1:41 AM Po Lu wrote: > Eli Zaretskii writes: > > > Does NS use a separate thread to handle input events? > > Unfortunately not. > > > If so, could that separate thread set quit-flag when we are under > > throw-on-input, if it detects a suitable input event? The w32 port > > does that, see signal_user_input in w32fns.c. This should allow the > > Lisp thread detect that input is pending in a more timely fashion. > > I understand that approach, it's taken in the Android port as well. > Unfortunately, it cannot work because the NS port currently runs in the > same thread that Lisp runs in. > > Thanks. > --000000000000a19abe05f2539030 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for the quick response and= the info. Sounds like this can't be fixed easily; I'll see if poll= ing-period works for me.

On Sun, Jan 15, 2023 at 1:41 AM Po Lu <luangruo@yahoo.com> wrote:
Eli Zaretskii <eliz@gnu.org> writes:<= br>
> Does NS use a separate thread to handle input events?

Unfortunately not.

> If so, could that separate thread set quit-flag when we are under
> throw-on-input, if it detects a suitable input event?=C2=A0 The w32 po= rt
> does that, see signal_user_input in w32fns.c.=C2=A0 This should allow = the
> Lisp thread detect that input is pending in a more timely fashion.

I understand that approach, it's taken in the Android port as well.
Unfortunately, it cannot work because the NS port currently runs in the
same thread that Lisp runs in.

Thanks.
--000000000000a19abe05f2539030--