From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eighty Megabytes Newsgroups: gmane.emacs.help Subject: Re: Does emacs cache something on windows when invoking call-process? Date: Tue, 9 Jul 2019 17:58:34 +0200 (CEST) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="232323"; mail-complaints-to="usenet@blaine.gmane.org" To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 18:14:26 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hksl7-000y9O-Qr for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 18:14:26 +0200 Original-Received: from localhost ([::1]:51356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hksW3-0005Hd-T0 for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 11:58:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53193) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hksVt-0005HT-3d for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 11:58:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hksVr-0005JB-7E for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 11:58:40 -0400 Original-Received: from fmfe37.onbox.hu ([46.107.16.242]:21388 helo=web-out.onbox.hu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hksVp-0005HO-Pr for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 11:58:38 -0400 X-fm-smtp-source: yes Original-Received: from localhost (localhost [94.21.246.135]) by web-out.onbox.hu (Postfix) with SMTP id 45jn6f20N6zbRj for ; Tue, 9 Jul 2019 17:58:34 +0200 (CEST) X-AccountId: 57978162 X-Originating-Ip: 94.21.246.135 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrgedvgdelkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdcuhfftgffgofetkffnnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffkufggtgfvihffsegrtdersgdttdejnecuhfhrohhmpefgihhghhhthicuofgvghgrsgihthgvshcuoegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhuqeenucfkphepleegrddvuddrvdegiedrudefheenucfrrghrrghmpehhvghloheppdhinhgvthepleegrddvuddrvdegiedrudefhedpmhgrihhlfhhrohhmpegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhupdhrtghpthhtohephhgvlhhpqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/relaxed; t=1562687914; s=20181004; d=freemail.hu; h=From:Message-ID:Subject:MIME-Version:Content-Type:To:Date; l=4505; bh=3gcvPQXRfVAigWkGYLAOwbA7t7o/SI5MI9GWJg2PFAg=; b=qHxXfug69cVYH5OMXrbAfa547X8PvgY3gjYLicMusuWH2DAhWk0knpE/gomvQ7NE Jhpq/rP8BNCb+VapWqhwD6DJfDrTIP8aGyJ4ix/kJy4hOUu5P4Gv2ckzHvVgTWzTe7g o8hWmX+kUeokTBzqkf2m9YWkVq6hJ7N6RIwJM9hutYgErlsfU0B/3KsTmWfX3uIcc0O RAT0MCAKslNnVo46mu1gCNtB7ACYIoap2FgvVt89XhaiT2NkYV4EwOpaXc9ry70fb04 jHyF1s1+Tc8Dn7SkUxCcYyHAUA2q9uXkhCdIoK6OSDNhUHl+QQeFWC4HGb8NnqRoC4h LmpnJUVeZg== X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 46.107.16.242 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121125 Archived-At: > From: =C2=A0=C2=A0 =C2=A0Eli Zaretskii >=C2=A0 > This doesn't happen to me: I get instantaneous response from Emacs as > well. =C2=A0On the first attempt as well on the subsequent ones. It does for me too usually with other commands. It's ripgrep. If I invoke simply ripgrep --help via emacs call-process then it's instanta= neous: "c:\\bin\rg.exe" --help But if I do this search with it via call-process, so (call-process "c:\\bin= \\rg.exe" nil t nil =C2=A0args...)) "c:\\bin\rg.exe" --color never --no-heading --line-number -U --pcre2 --type= php "function\s*fetch_object_info\s*\(|\*\s@method\s+[^ ]+\s+fetch_object_= info\(|(\s|->|\$|::)fetch_object_info\s*=3D\s*|\*\s@property(-read|-write)?= \s+([^ ]+\s+)&?\$fetch_object_info(\s+|$)|trait\s*fetch_object_info\s*\{|in= terface\s*fetch_object_info\s*\{|class\s*fetch_object_info\s*(extends|imple= ments|\{)" c:/proj/test then it takes 6-7 seconds from Emacs. This search returns a single line as a result. It is run on a codebase of s= everal dozen files, so not a huge codebase. =C2=A0 The exact same command a= lways returns the resulting line instantaneously from a command prompt. And that's what I dont't get that how it is possible that the exact same co= mmand is immediately gives the result from the command prompt and takes 6-7= seconds from call-process. >=C2=A0 > Do you have some antivirus installed, per chance? Just the default windows defender.=C2=A0 >=C2=A0 > > 2. What does that first call-process call does/caches in emacs which ma= kes=C2=A0 > > subsequent calls quick until it forgets something and it's slow again? >=C2=A0 > AFAIK it does nothing inside Emacs or by Emacs. =C2=A0It might do somethi= ng > on your system level, though. =C2=A0But that's out of scope of Emacs. If it happens on the system level then shouldn't it affect the same command= when executed via a command prompt? =C2=A0