From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?iso-8859-1?Q?Jo=E3o_T=E1vora?= Newsgroups: gmane.emacs.devel Subject: Re: Speeding up Flymake in emacs-lisp-mode Date: Fri, 02 Nov 2018 14:06:18 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1541167479 6549 195.159.176.226 (2 Nov 2018 14:04:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2018 14:04:39 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 02 15:04:35 2018 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 1gIa3r-0001YO-Bd for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2018 15:04:31 +0100 Original-Received: from localhost ([::1]:51862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIa5x-00079L-Pc for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2018 10:06:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIa5r-00079G-5l for emacs-devel@gnu.org; Fri, 02 Nov 2018 10:06:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIa5n-00021R-5y for emacs-devel@gnu.org; Fri, 02 Nov 2018 10:06:35 -0400 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:32814) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIa5m-00020Q-So for emacs-devel@gnu.org; Fri, 02 Nov 2018 10:06:31 -0400 Original-Received: by mail-wr1-x42b.google.com with SMTP id u1-v6so2141608wrn.0 for ; Fri, 02 Nov 2018 07:06:30 -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=l9/Tww+Sj4Mt09y2SFGayaEO+MjpuaxdAwnoMnslP9s=; b=c1pvkHCVoyJRXsUCQrpS0ntZlswHV+1DIsAudVupq1weNPxzz3rR4fJiCI4TXZ8yF7 PAdFAazs6ZOdGc/t2h/zx1PnTNQi5MA9zgykqSC1OXyLieRe/uNrZB2S+6gfyiQgQ+Ji onEN3jvexMeJUi+dRU+oECUsskyQkJKsfgmLBqwS92lYN+/WVXQKGSmkiuU+MLML7rdl fiDFsAZU/oPkHrncSPmf0l1PB2GXwhTpNN6zKicctjrEDI2F1bdC50OzkbCRN2zU+A3l WDDOaCxZmVkmg8Le8ueu4ai667d0Q/5+ZXj2OO8GpHE8ZNqkQiDRxEVagXzZoJKYBs3h 74Ag== 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=l9/Tww+Sj4Mt09y2SFGayaEO+MjpuaxdAwnoMnslP9s=; b=UdF7UhVSX+hWF3UJQt7xeRG/t/hFaf0ebS87838Vmx6CMa4CCwGKTp84KHVA8M3z3+ 3NRf9MjtrnMNAIWVJRa5lT5lfjwo/blvOX0K5pqfbVogKU0iYJLBsNy9Mo/GD9o+tbWG ixi0buoA1+CEinfIEDDbEvV7QECLuAT6ewphN91W+uiZt7Kk7YVo30dZLHtO3zZ9l9zt GPDSR6JTyyH+RyHO+/rytTDklRnD8gtFUbtvlYqQebNRZQXVqimxTQecLi7eV1X+HTLi ITQND6HUIfNK3fMrCSoLfOezm8K6ynO9/dm9K1demjaxbeLz3EETLfnmBDEvEUQMBdby jE6Q== X-Gm-Message-State: AGRZ1gKyd5uFLzq0Srusa6iOipRFdHZo3ZRZl+xcIxZx7gMcXsX0oHzg WKCeAo9AgzZDRkSya6R/nCwa+arX X-Google-Smtp-Source: AJdET5eiB87SDM/w3xpsjC4ePeygjiYVwn5utH+dPrk8OVRaRmZ0IYkbcTM56Gh1ze1wWv2iS+JKtw== X-Received: by 2002:adf:9051:: with SMTP id h75-v6mr2615538wrh.65.1541167589155; Fri, 02 Nov 2018 07:06:29 -0700 (PDT) Original-Received: from GONDOMAR.yourcompany.com (mail3.siscog.pt. [195.23.29.18]) by smtp.gmail.com with ESMTPSA id 64-v6sm40238417wrr.64.2018.11.02.07.06.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 07:06:28 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 02 Nov 2018 09:05:06 -0400") X-Antivirus: AVG (VPS 181102-2, 02-11-2018), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b 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:230976 Archived-At: Stefan Monnier writes: >> First, I was under the impression that stdin/stdout for emacs was >> not easy. > > Usually it's not, but when running in batch mode it's not so bad. > >> Glad to hear it isn't, but how do I read from stdin? > > async.el does it with (read t), IIRC. > >> Are you suggesting I keep a pool of ready to invoke emacsen >> and discard them once they become "dirty"? > > I think so, yes. I'd limit the pool to a single process. Actually, now I think Noam was suggesting something else, which is insulating slow process creation from the "main" emacs. And that indeed requires just a single extra process. > It should be easy to do directly within async.el. > Basically, change async-start so that instead of > > (let ((proc (async-start-process ...))) > (async--transmit-sexp proc ...)) > > it does > > (let ((proc async--eager-process)) > (async--transmit-sexp proc ...) > (setq async--eager-process (async-start-process ...))) Yeah, but I don't see why I need to restart async--eager-process (assuming that's what async-start-process does). Is async.el in ELPA? Jo=E3o