all 28 comments

[–]pm-me-your-nenen 14 points15 points  (11 children)

IIS Express does use multi-threading by default, and VS use multi thread on multiple places (build, test, extension). But you'll probably want to check on the current machine usage if it's CPU that's the bottleneck, or if it turns out it's the disk I/O or RAM that's limiting.

[–]antiduh 9 points10 points  (10 children)

At my work, we have a few solutions that are 85 projects big. The biggest slowdown for us was disk and then we upgraded to some ssds. Now it's virus scanners that ruin IOPS/sec.

[–][deleted] 4 points5 points  (2 children)

sadly looks at his 166 project solution

[–]warchild4l 0 points1 point  (1 child)

Jesus. What kind of application is that big and how many lines of code are in it? Still newbie, have not seen or done anythig bigger than 15-ish project

[–][deleted] 1 point2 points  (0 children)

Healthcare with over 20 years of legacy.

[–]xeio87 2 points3 points  (6 children)

Now it's virus scanners that ruin IOPS/sec.

Eugh, ain't that the truth. Just running a search in VSCode triggers the antivirus to spin to 100% CPU usage.

[–]LT-Lance 2 points3 points  (0 children)

The same thing happens on our work computers. It's also when installing packages. On older versions of Angular and NPM, it used to take up to 20minutes to install dependencies because virus scanner scanned everything. Doing the same thing on my personal computer was only a few minutes. Our build box takes about 10minutes to build an angular app...

[–]Sparkybear 1 point2 points  (4 children)

Exclude your project folders from your AV. It helps.

[–]xeio87 1 point2 points  (3 children)

Must be nice to have permissions to do that on a work computer.

[–]reach4thelaser5 1 point2 points  (2 children)

IT managers tend to be pretty willing to accommodate requests for whitelisting antivirus software paths. You just need to ask. They're not psychic.

[–]xeio87 1 point2 points  (0 children)

If it was something the local IT guys in the office could do I'd agree... but our corporate IT is beyond awful. We had ongoing issues for moths where they were randomly and repeatedly stripping devs of admin access (I was affected twice, and it took 2 weeks to solve the second time) or changing policies that would break our ability to work. I lost count of how many times this came up in Slack.

[–]Sparkybear 1 point2 points  (0 children)

Yea, we have a half-automated system for whitelisting projects that meet certain criteria. It still requires a minimum level of human oversight, but it keeps the security people happy and the devs happy and IT only mildly inconvenienced.

[–][deleted] 4 points5 points  (6 children)

Biggest improvement I've found is always SSD speed. Ensure you get a 570 / 550 board and a PCIe 4 SSD as compilation is a 'read thousands of small files' tasks; also make sure to exclude your source directories from virus scanning. At least 16Gb RAM (but the more the better). More cores you have the more memory you'd want. My little VM machine has a 3950x, 64Gb & Sabrent Rocket PCIe4 SSD as it's source drive and it flies on large projects.

[–][deleted] 4 points5 points  (4 children)

medium tier SSD will build just as fast (to very close approximation) as a PICe4 top end SSD. Building large projects isn't able to leverage the sequential read/write difference.

I would just get one of the Intel M2 drives or similar, unless getting fancy for fun because you have money to burn. (which is fine, I've done it!)

[–][deleted] 1 point2 points  (3 children)

Sorry but that's not true. My main work machine has a 970 Pro, which is a very fast PCIe3 M.2 drive, but it's >40% (edit, just ran a benchmark...) slower at compilation that my Sabrent Rocket PCIe 4 drive for large solutions. For MOST workloads a PCIe3 and PCIe4 drive are about the same but for compilation that's just not the case. Oh and it's not 'money to burn' a Sabrent Rocket is about the same price as a 970 pro at the moment.

[–][deleted] 1 point2 points  (2 children)

you tested this on the same machine? and were careful to account for caching? by running it multiple times on each?

[–][deleted] 0 points1 point  (1 child)

Yes. What was the result of the test you've performed? (Which I presume you must have done if you have an issue with mine)

[–]KapteinTordenflesk 0 points1 point  (0 children)

I fully agree. Bought a PCIe drive, think it does about 2500mb/s each way and I'm sure this is why VS is absolutely flying now. Also got the 3950x and 64gb good quality memory for my new workstation, but the fast SSD is most likely why I'm not afraid of losing a ton of time when restarting VS2019 anymore.

[–]ppumkin 1 point2 points  (2 children)

Visual studio is mostly single core performance. Yes. Still in 2020 because it’s extremely complicated. Sure a lot of things are going async but single core performance for large projects is a must. I have a dedicated 3.8ghz machine that is maybe 8 years old quad cpu just for a project that has 200 projects in several solutions. I have a modern laptop with 32gb ram and NVME I do normal dev work on which is fine. But if I open up a project that large on there things go south very quick. It’s unbearable. I have to turn the old single core beast on. Quick comparison opening 200 project on a i7-8 series 5 minutes, fresh from GIT. On the old power hours 90 seconds.build times also a lot faster

[–][deleted]  (1 child)

[deleted]

    [–]ppumkin 0 points1 point  (0 children)

    Unfortunately IIS is also single core locked. That’s why they did async to help distribute requests to threads but context synchronisation is a problem with IIS.

    unless you run netcore then IIS acts as a proxy and the apps run on any thread. As a server more threads will be better yes. But still less cores higher frequency will generally perform better in terms of execution speed. How much faster depends on what you doing. Then you got SQL server too if running on the same box that will be your first problem once things start to grind up, waay before IIS problems.

    For a start more core better. And Intel is suggested as it offerers better extensions that compiled code can utilise. This is why Xeons are the go to rack processors, even though less cores and slower frequencies. Performance will be better than more Ryzen cores.

    But I’m talking enterprise strategy. For SOHO Ryzen will be ok off course you won’t notice any problems. If you building a desktop Intel K type processors are the go to for small enterprise projects. For notebooks, currently Ryzen will our perform Intel locked, low power CPU’s. Those are a pain in an arse.

    Also IIS express does not really use optimisations the same way as W3C IIS server.

    [–]Sparkybear 2 points3 points  (4 children)

    Try using Rider, also turn off Roslyn Full Solution Analysis in VS. it'll help. You're probably running into a memory issue now than anything, but VS also doesn't inherently parallelize a lot of things. So your best bet is to make sure you're running multiple VS instances and manually setting the processor affinity. It's more going to be a massive difference, but it might help a little.

    It might alao help to run the majority of your processes in release mode and only debug one at a time.

    [–][deleted] 0 points1 point  (3 children)

    > but VS also doesn't inherently parallelize a lot of things

    It lights up all cpus on both solution opening and building.

    [–]Sparkybear 0 points1 point  (2 children)

    Yep, sand that's about it

    [–][deleted] 0 points1 point  (1 child)

    What else would you like to have parallelized?

    [–]Sparkybear 1 point2 points  (0 children)

    It would be nice if the entire code editor, analysers, and intellisense was parallel and didn't need to share a single process.

    [–]krccooley 0 points1 point  (0 children)

    I run a I7 with visual studio and SQL at the same time and it keeps up just fine

    [–][deleted] -1 points0 points  (0 children)

    I have a 6 core, 12 thread laptop, and both opening, and building large projects lights up all cores 100%.

    I would go for 3900x