public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Sam Edge <sam.edge.cygwin@gmx.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin a bit slow
Date: Wed, 10 Apr 2024 17:43:05 +0100	[thread overview]
Message-ID: <cab76864-77d6-48d1-85cb-ceda3e8b1e4e@gmx.com> (raw)
In-Reply-To: <df9abc70-6135-2871-c78f-aa87bc12f25b@t-online.de>

On 10/04/2024 11:34, Christian Franke via Cygwin wrote:
> J M via Cygwin wrote:
>> ...
>>
>> Specifically for this problem, I have investigated the problem and can be
>> related to pipes and antivirus.
>>
>> Specifically
>> while true
>> do
>> echo ABC | grep AAA
>> done
>>
>> It makes the cpu of that antivirus go up.
>
> This is as expected because malware scanners hook into Win32 API's
> CreateProcess*() calls which are also used by the fork()/exec()
> emulation of Cygwin. Each run of 'grep' above uses at least two
> CreateProcess*() calls.

This is very true and depends greatly on the AV being used. I find Trend
is particularly bad, even if you exclude all the Cygwin directories and
directories of files being accessed. Somehow, the way the hooks are
implemented stalls process creation and file open in ways that Windows
Defender does not. This is particularly noticeable when using
Cygwin-based build tools - build times generally increase at least
10-fold after installing Trend.

On one job, I wasted a lot of time and client's money collecting logs
for Trend to analyse to no avail. I think the product is basically very
badly written. The fact that it creates dozens of processes with
hundreds of threads just to do AV scanning does not fill me with confidence!

Wherever possible, I remove third-party AV from Windows machines and
install group policy to enforce Windows Defender and malware detection
in the browser and/or a proxy & the email server instead. Saves a lot of
CPU cycles. :-)


--
Sam Edge


  reply	other threads:[~2024-04-10 23:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 15:18 J M
2024-04-05 15:21 ` J M
2024-04-05 16:04   ` Brian Inglis
2024-04-06  8:57 ` Lee
2024-04-08 19:47 ` Adam Dinwoodie
2024-04-09 18:56   ` J M
2024-04-10 10:34     ` Christian Franke
2024-04-10 16:43       ` Sam Edge [this message]
2024-04-12 18:01         ` J M
2024-04-13  8:09           ` Sam Edge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cab76864-77d6-48d1-85cb-ceda3e8b1e4e@gmx.com \
    --to=sam.edge.cygwin@gmx.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).