From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19776: 25.0.50; HTML rendering is very slow Date: Mon, 25 Oct 2021 19:09:47 +0300 Message-ID: <83h7d513xw.fsf@gnu.org> References: <87d1tuw42p.fsf@gnus.org> <87tvsc6syh.fsf@mouse.gnus.org> <87h8oc6sfs.fsf@mouse.gnus.org> <83pmrw5hfs.fsf@gnu.org> <875ytmbnk2.fsf@gnus.org> <83y26i34e1.fsf@gnu.org> <87wnm27b57.fsf@gnus.org> <87sfwq75q4.fsf@gnus.org> <87wnm22q7y.fsf@gnus.org> <83ee8a2pm7.fsf@gnu.org> <87fssq2orj.fsf@gnus.org> <875ytm2h37.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14348"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan@marxist.se, 19776@debbugs.gnu.org, rms@gnu.org, monnier@iro.umontreal.ca To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 25 18:14:05 2021 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 1mf2bt-0003VQ-ER for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Oct 2021 18:14:05 +0200 Original-Received: from localhost ([::1]:49188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mf2bs-0003kS-Gu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Oct 2021 12:14:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf2Yw-0000LH-6j for bug-gnu-emacs@gnu.org; Mon, 25 Oct 2021 12:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mf2Yv-000590-ST for bug-gnu-emacs@gnu.org; Mon, 25 Oct 2021 12:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mf2Yv-0001Kn-K0 for bug-gnu-emacs@gnu.org; Mon, 25 Oct 2021 12:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Oct 2021 16:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19776 X-GNU-PR-Package: emacs Original-Received: via spool by 19776-submit@debbugs.gnu.org id=B19776.16351782345091 (code B ref 19776); Mon, 25 Oct 2021 16:11:01 +0000 Original-Received: (at 19776) by debbugs.gnu.org; 25 Oct 2021 16:10:34 +0000 Original-Received: from localhost ([127.0.0.1]:44085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf2YT-0001K2-Qc for submit@debbugs.gnu.org; Mon, 25 Oct 2021 12:10:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf2YI-0001Jb-Q5 for 19776@debbugs.gnu.org; Mon, 25 Oct 2021 12:10:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46188) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mf2YD-0003ko-4A; Mon, 25 Oct 2021 12:10:17 -0400 Original-Received: from [87.69.77.57] (port=3085 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf2Xr-0007oo-3u; Mon, 25 Oct 2021 12:09:55 -0400 In-Reply-To: <875ytm2h37.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 25 Oct 2021 00:28:12 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:218312 Archived-At: > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , stefan@marxist.se, rms@gnu.org, > 19776@debbugs.gnu.org > Date: Mon, 25 Oct 2021 00:28:12 +0200 > > Stefan Monnier writes: > > > Basically all loops should call `maybe_quit`, so the issue is probably > > not that `maybe_quit` is not called often enough, but that for some > > reason we don't set the vars that it checks or something like that. > > I've been trying to follow the logic in how the atimer stuff is supposed > to work. It registers a special timer fd that sets a timeout, and it's > supposed to be called back in timerfd_callback. And that happens if I'm > (for instance) idling in a `sleep-for'. > > When Emacs is busy looping, we never get a callback -- presumably > because we're not reading any file descriptors in that case? But... > was the idea that this would work in a busy Emacs? I mean, events from > the keyboard/mouse are able to poke Emacs in a way that it realises that > it has a pending event to handle, but not the timerfd? Input events work via SIGIO on X, and SIGIO sets pending_signals, and then we check the atimers. I guess this means timerfd is only good for when Emacs is calling thread_select, i.e. either it's idling or waiting for process output. So timerfd, if available, should be used together with interval timers, so that we get SIGALRM when we aren't idle, I guess. Not either timerfd or interval timers, but both.