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: Sun, 08 Oct 2017 10:32:38 +0100 Message-ID: <87tvzavvbd.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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507455201 21187 195.159.176.226 (8 Oct 2017 09:33:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Oct 2017 09:33:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: eliz@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 08 11:33:18 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 1e17xV-0004nc-PZ for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 11:33:17 +0200 Original-Received: from localhost ([::1]:53019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e17xb-0003OH-Cr for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 05:33:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e17x1-0003O1-4o for emacs-devel@gnu.org; Sun, 08 Oct 2017 05:32:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e17x0-0006oM-5Q for emacs-devel@gnu.org; Sun, 08 Oct 2017 05:32:47 -0400 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:56709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e17ww-0006h0-4R; Sun, 08 Oct 2017 05:32:42 -0400 Original-Received: by mail-wm0-x22e.google.com with SMTP id l68so16410906wmd.5; Sun, 08 Oct 2017 02:32:41 -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:content-transfer-encoding; bh=+dfhlRsL9TF+eEsUBysgBKof3mlT7d7UaRAhaPBzMOA=; b=L0GgoqORO0kwz9X9oO7qtJUGlF4yaFy8SHWXcYn6JNMbZnNLhkqaYMqYtlxiR//SSZ BbkP5Mr2tYzHC/d2HWkLC1q8TLjo6wju+TBKcLyQIWBI2qpL1nbtmJSktEaDTjxIkuuP PQp64Er9CrABQKzY6IaMU5yi8lYz2hBogWk61ejZ/EEZzhg1zpOYcz7peRHWFQbDUPsk HqO7n9Vnvd1wavZ05zxC0+mZx2a2oxii9v1qBLoihvAQCSn2RxKrm6FzWJ/qzJM96o8A Hrn/jbfO6NWxIzL9dOTzGkZ1Bo7jNgURLINdc5o1axTxE2qWHWzAUgq/Z6nOOPQU5Hmo 1EPg== 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:content-transfer-encoding; bh=+dfhlRsL9TF+eEsUBysgBKof3mlT7d7UaRAhaPBzMOA=; b=QdrGAXYkpYbof0xpLXsvVkNFfZXktbvdK3J0AKgOsVtIUUeItpwcr3LDfiVvuCtKM6 4YEvm0OIwbQz+cZof0bEf/wh7KqFQ2ncryfZw9ArfvZm8sgAvHkDmBgtA2wl3wi8Eq21 OuPc1Pv2GEkndph+c3Qx+GUDkr/Ra7Vqhhb8Of5bV1fDO5kUbCBt4OMKCDBzN3cySSBk Zm84npgb3JkaUoTtik6pf2fPcRilxSECLAHeHQUnnQRkJ7acUhok4/wSzUevk77PR2t6 j25PsKcu4294DgCiKE6KC2z3JhpAoy5PqxVLxDqkfm2h69Ns6q1DefM48Nuh4hVMsXez AzVA== X-Gm-Message-State: AMCzsaWUJk2/opby80u/RLi/PNaQKVDA9lLG6dmAoNhpF9FS5xiRmBux wxMTD/sygMZwXRET512L00xdLOS2 X-Google-Smtp-Source: AOwi7QBo5DVH1EC+vWTcTrwEChvMEtBRpVMQgWDVtm1A+q128YdOSW0m7FEREvSvkAa4BSV8GKKarQ== X-Received: by 10.28.51.133 with SMTP id z127mr5130908wmz.110.1507455160737; Sun, 08 Oct 2017 02:32:40 -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 50sm11488700wry.84.2017.10.08.02.32.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Oct 2017 02:32:40 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 07 Oct 2017 22:06:27 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e 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:219241 Archived-At: Stefan Monnier writes: >> However, I have a problem when using the new implementation in my real >> development context, that wasn't present before (before Jo=C3=A3o work I= was using >> python-flymake-pyflakes from ELPA). > >> I use the `desktop' functionality, to keep a persistent state of open fi= les, >> and in one project the `emacs.desktop' file has 367 entries, of which 28= 4 are >> python-mode buffers: now when I open that project the python-flymake bac= kend >> gets disabled with the following errors, for each python-mode buffer: > >> Warning [flymake xxx.py]: Disabling backend python-flymake because >> (file-error Creating pipe Troppi file aperti) > > IIUC this problem is with some "old" backend that worked fine with the > old flymake but now exhibits a poor behavior with the new flymake. > In that case I suggest you `M-x report-emacs-bug` so we can track > it down. A seemingly good workaround to fix this is to bind flymake-start-syntax-check-on-find-file to nil around that mega file-finding operation. This is a bit what Eli suggested, I think. And I think the only real reason "old" Flymake managed to launch ~300 processes immediately without choking up is that it did so under with-demoted-errors, so that's not really a fair comparison (though, granted, I removed it --- and now I understand why it was there). > It's probably due to changes in the way flymake decides when to run > the backend(s) and we should fix those issues. I don't see what flymake.el can do about it, since it is was designed to be agnostic to the way backends allocate resources to start syntax checks. In other words, to "properly" fix this, the Python backend must throttle its process-making, which is another argument in favor of using a more sophisticated version of the 'flymake-easy-make-process' function that I sent you some a couple of days ago. Another way to fix it is to add throttling capabilities to make-process itself. I don't know if it is possible since it is a big change to its semantics, which seem to imply that system resources are immediately allocated. Meaning that if a :throttle arg were accepted (process-id (make-process :name "true" :command '("true") :throttle t)) wouldn't make sense, because make-process could actually not have allocated any system resources.