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: Speeding up Flymake in emacs-lisp-mode Date: Fri, 02 Nov 2018 09:05:06 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541164191 24721 195.159.176.226 (2 Nov 2018 13:09:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2018 13:09:51 +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 Fri Nov 02 14:09:47 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 1gIZCs-0006KH-Au for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2018 14:09:46 +0100 Original-Received: from localhost ([::1]:51572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIZEy-0001qP-LL for ged-emacs-devel@m.gmane.org; Fri, 02 Nov 2018 09:11:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIZ9D-0004AN-OC for emacs-devel@gnu.org; Fri, 02 Nov 2018 09:06:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIZ99-0003MM-Gt for emacs-devel@gnu.org; Fri, 02 Nov 2018 09:05:59 -0400 Original-Received: from [195.159.176.226] (port=60485 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIZ99-0002cR-3F for emacs-devel@gnu.org; Fri, 02 Nov 2018 09:05:55 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gIZ6M-0006VF-PW for emacs-devel@gnu.org; Fri, 02 Nov 2018 14:03:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:u15oTORHJROIX9RXRkF68kslqU8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:230973 Archived-At: > 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. 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 ...))) -- Stefan