visual-studio 由于不同的病毒扫描程序,Microsoft Visual Studio 速度变慢

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1305709/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:53:21  来源:igfitidea点击:

Slowdown of Microsoft Visual Studio due to different Virus scanner

visual-studiofile-ioantivirus

提问by Ian Ringrose

What is the least slow Virus scanner to use with Microsoft Visual Studio

与 Microsoft Visual Studio 一起使用的最慢的病毒扫描程序是什么

I have just had Microsoft Visual Studio “go slow” on me again due to my Virus Checker… (100s of Projects, some with over 100 C# files in them, so any thing that slows down builds is bad.)

由于我的病毒检查器,我刚刚让 Microsoft Visual Studio 再次“变慢”......(数百个项目,其中一些包含超过 100 个 C# 文件,因此任何减慢构建速度的事情都是糟糕的。)

We all know that development tools do a lot of file access so are badly effect by Virus Scanner. Most of us have to run a Virus scanner due to do many reasons.

我们都知道开发工具会进行大量文件访问,因此受到 Virus Scanner 的严重影响。由于许多原因,我们大多数人都必须运行病毒扫描程序。

So has anyone measuredthe effect of different virus scanners (and settings) on the speed of Microsoft Visual Studio?

那么有没有人测量过不同病毒扫描程序(和设置)对 Microsoft Visual Studio 速度的影响?

Has anyone tied Microsoft Security Essentialswith Visual Studio?

有没有人将Microsoft Security Essentials与 Visual Studio 联系起来?

See also (if you have the rep, please extend the list)

另请参阅(如果您有代表,请扩展列表)

What are peoples experiences with Visual Studio 2010 and virus checkers?

人们对 Visual Studio 2010 和病毒检查程序的体验如何?



I got this as part of a helpful email from someone (that will rename nameless) at Microsoft speaking on his own behalf.

我从 Microsoft 的某个人(将重命名为无名)代表他自己发言的有用电子邮件中收到了此信息。

It's not clear that we (Microsoft) would be able to endorse 3rd party products. With that in mind, I did notice that in the posting Ian linked to (this question) that Computer Associateswas listed by someone as one of the best performing virus checkers for development environments, which interestingly enough is a product that I believe many Microsoft developers use on their desktops.

目前尚不清楚我们(微软)是否能够认可 3rd 方产品。考虑到这一点,我确实注意到在 Ian 链接到(这个问题)的帖子中,有人将Computer Associates列为开发环境中性能最佳的病毒检查程序之一,有趣的是,我相信许多 Microsoft 开发人员都认为这是一款产品在他们的桌面上使用。



Since asking this question, I have had the least problems with Microsoft Security Essentials, however I have no facts or measurments to back this up.

自从提出这个问题以来,我对 Microsoft Security Essentials 的问题最少,但是我没有任何事实或衡量标准来支持这一点。

采纳答案by Magnus Johansson

I haven't really done any measurements, but what I usually do is to exclude the real time scanning of my development folder (usually my :\Projects folder). That way, the compiler can work as fast as possible during my everyday repetitive tasks. I do have a daily scan that have the folder in question in its path, in order to fetch any possible threat. On a subjective note, I prefer to use NOD32.

我还没有真正做过任何测量,但我通常做的是排除对我的开发文件夹(通常是我的 :\Projects 文件夹)的实时扫描。这样,编译器可以在我的日常重复任务中尽可能快地工作。我每天都会扫描路径中有问题的文件夹,以便获取任何可能的威胁。主观地说,我更喜欢使用 NOD32。

回答by devstuff

Based on previous installations at various jobs, empirically rated from slowest (very annoying) to quickest (almost no impact):

根据之前在各种工作中的安装情况,根据经验从最慢(非常烦人)到最快(几乎没有影响):

I wouldn't bother with the speed tests, etc. shown at the AV review sites since most of these are in controlled environments, often with review-mode enabled. The impact will also vary depending on your network environment (workgroup or domain) and administrator-enforced policies.

我不会打扰 AV 站点上显示的速度测试等,因为其中大多数都在受控环境中,通常启用了模式。影响也会因您的网络环境(工作组或域)和管理员强制执行的策略而异。

Disclosure: I used to work on another now-obsolete anti-virus package back in the 90's.

披露:我曾经在 90 年代开发另一个现已过时的防病毒软件包。

回答by penderi

I'd have to agree with the first answer.

我不得不同意第一个答案。

I've seen such issues differ between jobs according to the verocity of the admins' intent to leave configs unchanged for devs. Correctly setup virus scanners still hinder dev, but at least it's bearable.

我已经看到,根据管理员为开发人员保持配置不变的意图的真实性,工作之间的此类问题有所不同。正确设置病毒扫描程序仍然会阻碍开发,但至少它是可以忍受的。

So I edit the scan lists to:

所以我将扫描列表编辑为:

  • Exclude all dev code directories
  • Exclude Temporary ASP.Net gen'ed areas
  • Exclude Resharper caches
  • 排除所有开发代码目录
  • 排除临时 ASP.Net 生成区域
  • 排除 Resharper 缓存

I find this improves the disk thrashing that otherwise occurs with Visual Studio, Resharper and a Virus Scanner all hammering the drive. As always SysInternals' Filemoncan help you target rogue services/processes.

我发现这改善了磁盘抖动,否则 Visual Studio、Resharper 和病毒扫描程序都会对驱动器造成冲击。与往常一样,SysInternals 的 Filemon可以帮助您定位流氓服务/进程。

回答by Orion Edwards

We have Trend Micro antivirus at work, and it's terrible. It seems particularly bad doing checkouts.

我们有 Trend Micro 防病毒软件在工作,这很糟糕。结帐似乎特别糟糕。

We commissioned a new build machine recently, and the IS team hadn't set up exclusions for the build drives, and it was taking 45 minutes to check out source code from TFS. With the AV turned off, the exact same source code took about 1 minute 30 seconds to check out.

我们最近委托了一台新的构建机器,IS 团队没有为构建驱动器设置排除项,从 TFS 中检出源代码需要 45 分钟。关闭 AV 后,完全相同的源代码需要大约 1 分 30 秒才能检出。

回答by MemeDeveloper

Would comment on answers from @MagnusJohannssonor @Rodrigobut don't have enough reputation. Just to agree really, and +1 for both.

会对@MagnusJohannsson@Rodrigo 的回答发表评论,但没有足够的声誉。只是真的同意,并为两者+1。

I have NOD32 4.x on two very similar machines, 2nd Gen intel SSD's plenty of RAM, Duo / Quad Core's overclocked, clean installs of win 7, VS2010.

我在两台非常相似的机器上安装了 NOD32 4.x,第二代英特尔 SSD 的大量内存,双核/四核的超频,全新安装的 win 7,VS2010。

Have used NOD32 for years on many different boxes and many different builds without any problems, but had a horrible issue on one of the machines after a hardware upgrade and reinstall of OS where ekrn.exe (NOD's service) would go nuts and just eat up all the CPU leaving me having to physically shutdown the box.

多年来一直在许多不同的机器和许多不同的版本上使用 NOD32 没有任何问题,但是在硬件升级和重新安装操作系统后,其中一台机器上出现了可怕的问题,其中 ekrn.exe(NOD 的服务)会发疯并吃掉所有的 CPU 都让我不得不物理关闭盒子。

After lots of to and fro with ESET support it was decided it was due to Visual Studio file access looking suspicious / being to quick, and in the end I excluded my project folders, and since then has been fine. Interestingly was project folder for a solution I was not using at the time, so maybe a TFS thing?

在 ESET 支持下进行了多次来回后,决定这是由于 Visual Studio 文件访问看起来可疑/速度太快,最后我排除了我的项目文件夹,从那时起就很好了。有趣的是,项目文件夹是我当时没有使用的解决方案,所以也许是 TFS 的东西?

Anyhow this link is a simple guide for anyone having same problem with NOD32's ekrn.exe eating CPU

无论如何,这个链接是一个简单的指南,适用于任何与 NOD32 的 ekrn.exe 吃 CPU 有相同问题的人

Excluding files or folders from real time scans

从实时扫描中排除文件或文件夹

回答by RED SOFT ADAIR

I also dont have maesurements, but some experiences:

我也没有测量,但有一些经验:

  • Dont use McAfee:We had serious performance problems (and other more serious ones) on a number of installations with that.

  • Use Avira AntiVir:Reportedly the highest success rates, and no noticeable delay. I use it since years.

  • 不要使用 McAfee:我们在许多安装中遇到了严重的性能问题(和其他更严重的问题)。

  • 使用 Avira AntiVir:据说成功率最高,而且没有明显的延迟。我多年来一直使用它。

回答by Scott Munro

Having Fusion assembly binding logging enabledin combination with a virus scanner can result in performance problems during startup of an application. Either disable the Fusion logging or add the folder that it logs to as an exclusion in your virus scanner.

Fusion 程序集绑定日志记录与病毒扫描程序结合启用可能会导致应用程序启动期间出现性能问题。禁用 Fusion 日志记录或将其记录到的文件夹添加为病毒扫描程序中的排除项。

回答by Eric

You really need to weigh the capabilities and support of the antivirus program against the slowness. In my case, I've used several different ones, and the best choice was Avast. The Home edition is free, and they are one of the best about updating their virus definitions as new threats appear.

您确实需要权衡防病毒程序的功能和支持与缓慢之间的关系。就我而言,我使用了几种不同的,最好的选择是 Avast。家庭版是免费的,它们是在新威胁出现时更新病毒定义的最佳版本之一。

回答by Rodrigo

Exclude your project folders and the visual studio app folder for realtime scan, and schedule a scan as often as you can feel safe.

排除您的项目文件夹和 Visual Studio 应用程序文件夹以进行实时扫描,并在您感到安全的情况下尽可能频繁地安排扫描。

回答by Athiwat Chunlakhan

Don't use Kaspersky(The old Tect Review one) it slows down normal explorer file opening for almost 10 second(Yes, you need to wait 10 second before opening each folder). And yes it affects Visual Studio. The new version does not seem the have the problem. NOD32 seem to not have this problem, and is a bit faster than Kaspersky(I don't even know if it's scan as much as Kaspersky does).

不要使用 Kaspersky(旧的 Tect Review 之一)它会减慢正常资源管理器文件的打开速度近 10 秒(是的,您需要等待 10 秒才能打开每个文件夹)。是的,它会影响 Visual Studio。新版本好像没有这个问题。NOD32好像没有这个问题,而且比卡巴斯基快一点(我什至不知道它是否像卡巴斯基那样扫描)。

But for what ever reason, NOD32 firewall is bad!

但是无论出于何种原因,NOD32 防火墙都很糟糕!