From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Flymake refactored Date: Sun, 08 Oct 2017 10:17:32 -0400 Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1507472273 25578 195.159.176.226 (8 Oct 2017 14:17:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Oct 2017 14:17:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 08 16:17:50 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 1e1COq-000658-Uo for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 16:17:49 +0200 Original-Received: from localhost ([::1]:53911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1COy-0000n1-Cf for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2017 10:17:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1COs-0000mk-Gq for emacs-devel@gnu.org; Sun, 08 Oct 2017 10:17:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1COo-0003Xb-JM for emacs-devel@gnu.org; Sun, 08 Oct 2017 10:17:50 -0400 Original-Received: from [195.159.176.226] (port=43715 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1COo-0003Ww-Bi for emacs-devel@gnu.org; Sun, 08 Oct 2017 10:17:46 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1e1COd-0004c6-0G for emacs-devel@gnu.org; Sun, 08 Oct 2017 16:17:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:4Z8I9GdANagObNX6B/eFcOVbmW4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:219244 Archived-At: > 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). Ah, in which case it's not that the old flymake.el worked, but that it croaked more discretely? That would be a good explanation. > 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. The problem can be fixed "anywhere" between desktop.el and make-process. There's a good argument that desktop.el should load buffers more lazily. 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 think asking backends to perform the throttling is a bad idea: we want the backends to be as lean/simple/concise as possible. Performing the throttling in make-process is also an option, but I think it's probably too low a level to do it right, unless we add a :throttle arg like you suggest (so that the higher-level code can pass the info), but that pushes the responsibility to the backend again. Stefan