From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Newsgroups: gmane.emacs.devel Subject: Re: Flymake refactored Date: Mon, 09 Oct 2017 11:19:57 +0100 Message-ID: <87bmlgwrle.fsf@gmail.com> References: <87h8vmj3tr.fsf@lolita> <1507138648.1972.0@smtp.gmail.com> <874lre2von.fsf@gmail.com> <87mv566yjx.fsf@udel.edu> <87shex276r.fsf@gmail.com> <87efqh2sud.fsf@udel.edu> <877ew919hd.fsf@gmail.com> <87poa0z4ur.fsf@gmail.com> <83o9pjt6m8.fsf@gnu.org> <87376vxbqs.fsf@metapensiero.it> <87tvzavvbd.fsf@gmail.com> <87h8v9w6y3.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1507544460 12296 195.159.176.226 (9 Oct 2017 10:21:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2017 10:21:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 12:20:56 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1VB3-0001qN-JA for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 12:20:49 +0200 Original-Received: from localhost ([::1]:56996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1VB9-00049y-Ec for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 06:20:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1VAM-000451-2m for emacs-devel@gnu.org; Mon, 09 Oct 2017 06:20:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1VAI-0000VR-1i for emacs-devel@gnu.org; Mon, 09 Oct 2017 06:20:05 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:56236) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1VAH-0000V3-Re for emacs-devel@gnu.org; Mon, 09 Oct 2017 06:20:02 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id u138so22036847wmu.4 for ; Mon, 09 Oct 2017 03:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KiAFOXzn7R6K9FtWn9Ng0g92KJoKIIldK6gcvnYQbQ0=; b=gmH69HN6YN+Bs6qoTRwXrann6YPssNLOZVUpGVBkamwT4UgjB/o/Vl73GiC+wd7BIq jot/jvVt0dsFSOU1MUPILtKm9rLrjDEGOS479WPExO8nz8IzqQyZ981H8ZDNmHadsI2y 4r1VM0Bm8olJtcna4/mRWhbjs8OLbsZulg2aaBmwx0dYyGMjJp9zdstGSvenRo79KkXX zG4NxllgYSuJ66FDEqGBd3mzmV1fSrFDl2yMsZESMfSw/hUThaTbWqLrjTOxaO7R8wYV TGfcVTbaTnfLGO3l+UPtPcOkVojtu3CWyiAblgJlOAauU2B4IfcBGpjJtCcjBMv0R4iR XWdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KiAFOXzn7R6K9FtWn9Ng0g92KJoKIIldK6gcvnYQbQ0=; b=EYf45jQ88CkInmL0tCikT3Vq89GRrrcmlj3wFLD+P7arke501sZKr5KbfpKcLJUJmf CyEcfFOcMzJqhJX3BLF+h5DsdVm/AdJk5666O3lJpne3XGyBOU9IKwXN+a2HFmKJygo4 3q4aTjpr4LJy4+0x2bSRzFP0kkrxRLi29VZnu4oRfmdyGP1a/bKdVaFaP1dbwNur+JLf C+hEoxwJL4IeFom28Lj+A/En0qfAi4YMZxwm4A1vbYBrZq9CwdRqDeyxqrrqTtRx9KeO UdDAM8Meow1RKBFtR3vPBLXoqXycjVTR7SgcnAu5/hOpeIA9tybtS5IIBjkR+Xsublve YeKg== X-Gm-Message-State: AMCzsaVUCBIulnIgjcVXpofpihdNJrvhEpaofbctCEc8eariZr1IjqZY q6Ak4yK2QJvwHNtcSH+gtx41Y0LZWAQ= X-Google-Smtp-Source: AOwi7QCd0gQJCWCNLnDKX6We6XP/pmtj8PvGOemeQhMwWMbYViZzT3MId01pozj0fPSY56vm0/HqCg== X-Received: by 10.223.174.214 with SMTP id y80mr8352105wrc.192.1507544400366; Mon, 09 Oct 2017 03:20:00 -0700 (PDT) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id m25sm7464572wmi.7.2017.10.09.03.19.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2017 03:19:59 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 08 Oct 2017 23:01:44 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219296 Archived-At: Stefan Monnier writes: >>> There's also a good argument to be made that flymake.el should itself work >>> more lazily (don't start checking until the buffer is actually >>> displayed, for example). >> I like this one. So flymake-mode either starts the check or does >> something to window-configuration-change-hook? Is that the idea? > I hadn't thought about how to go about it, but indeed maybe > window-configuration-change-hook could do the trick. I think it does the trick nicely. I just pushed 11b37b4a9, please have a look. Every `flymake-start' is deferred now to waiting until after the current command is over (if that command exists) and until the buffer is displayed (if it is not already). I think this is The Right Thing, as it also takes care of editing and save operations in undisplayed buffers. >> only works cooperatively, if all process creation uses it. If it is >> optional, it's not worth it. > There's also the issue that you end up checking all those many buffers > (i.e. consuming CPU&RAM&battery during this time) without any guarantee > that we'll actually look at those buffers. This is an orthogonal bit taken care by the above fix. I agree it mostly render this throttling sophistication useless.