help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does emacs cache something on windows when invoking call-process?


From: Eighty Megabytes
Subject: Re: Does emacs cache something on windows when invoking call-process?
Date: Tue, 9 Jul 2019 17:58:34 +0200 (CEST)


> From:     Eli Zaretskii
> 
> This doesn't happen to me: I get instantaneous response from Emacs as
> well.  On 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 
instantaneous:

"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  args...))

"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*=\s*|\*\s@property(-read|-write)?\s+([^
 
]+\s+)&?\$fetch_object_info(\s+|$)|trait\s*fetch_object_info\s*\{|interface\s*fetch_object_info\s*\{|class\s*fetch_object_info\s*(extends|implements|\{)"
 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 
several dozen files, so not a huge codebase.   The exact same command always 
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 
command is immediately gives the result from the command prompt and takes 6-7 
seconds from call-process.

> 
> Do you have some antivirus installed, per chance?

Just the default windows defender. 

> 
> > 2. What does that first call-process call does/caches in emacs which makes 
> > subsequent calls quick until it forgets something and it's slow again?
> 
> AFAIK it does nothing inside Emacs or by Emacs.  It might do something
> on your system level, though.  But 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?

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]