|
After installing an update to VS, I mean. Right now, I just updated to 17.5.4 (released earlier this week) from the previous 17.5.3.
Without fail, every time Visual Studio gets updated (I'm on 2022, but saw the same with previous versions), Task Manager shows many, many instances of mscorsvw.exe launching and running one after another--sequentially, not in parallel--for mere seconds each (< 2 seconds on average). It's actually a bit difficult to visualize with Task Manager as you might not even spot much going on, except that on each refresh the process (mscorsvw.exe) has a new PID and args, which means an instance has shut down, and a brand new one has started. I actually wrote a utility a while ago to log all process launches and shut downs, with full command-line args, etc, and right now - about an hour after the VS update process itself has completed and exited - I'm looking at over 800 instances of that process that have launched/closed (and still counting), each with params such as:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorsvw.exe -StartupEvent d80 -InterruptEvent 0 -NGENProcess d04 -Pipe d00 -Comment ""NGen Worker Process""
I realize this is one of those things that ultimately are "normal" and entirely to be expected (don't worry your pretty little head, after all, just let MS do its thing), but I'm just curious, if nothing else but for the fact that it seems excessive. I don't recall ever seeing any article or blog entry discussing what's going on during that phase.
[Unrelated: My utility demonstrates Win10 is consistently launching/closing roughly 10x more processes on their own, 24/7, than any predecessor ever did in the same amount of time. For all its progress in power-saving claims, this seems counterproductive. Again, why should anyone care? I'm not sure. I'm just sharing the observation...]
|
|
|
|
|
NGEN is a tool that takes .net code, compiles it to native, so it can be cached for reuse. Assuming it eventually stops happening, VS is background precompiling all the shiny new .net code you've got from MSIL to native binaries.
Ngen.exe (Native Image Generator) - .NET Framework | Microsoft Learn
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
[For argument's sake]
But the VS binaries I downloaded can only run on x86 anyway. Why are the binaries I downloaded not already precompiled as native x86, and save everyone that extra step?
|
|
|
|
|
dandy72 wrote: Why are the binaries I downloaded not already precompiled as native x86,
Some guesses...
It is including security info which is specific to the machine itself.
Although the OS is conceptually the same it is actually different on different machines. Some some potential compilations might produce different outcomes.
It doesn't just compile but also installs them. That can vary by machine.
It is just easier for them to do it this way in case any of the above is true or might be true. Maybe only for a couple of actual deployed units.
|
|
|
|
|
There are ARM versions of Visual Studio. And even on the Intel x86 architecture, there are newer and faster instructions to take advantage of. Or you prefer to be like C++; their generated instructions stick to archaic and minimum 80x686 instructions.
modified 15-Apr-23 4:56am.
|
|
|
|
|
Shao Voon Wong wrote: There are ARM versions of Visual Studio.
And how many people even have access to that, outside of MS?
|
|
|
|
|
anything vectorizable would have a bunch of versions depending on how new your CPU is. Older CPUs also need extra defensive programming around speculative execution exploits.
In theory they still could have precompiled binaries, but it's a lot more than just: x86, x64, or ARM?
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
Another thing to consider... Just because the VS Installer is pulling the packages and running the install for you, the .NET packages are available separately and cover multiple platforms. The packages themselves are not all VS and platform specific...
|
|
|
|
|
The code is compiled to IL, just not JIT-compiled to machine code. NGEN does this ahead of time (AoT) to improve startup performance at the expense of disk space, assuming disk reads are much quicker than JIT compilation. This also saves time and bandwidth transferring only the IL from Microsoft.
|
|
|
|
|
In principle, it could even start executing the code up until the first point where it was dependent on something outside the image, and freeze that as a modified starting image. If the initializing code executed had no external references, it could be peeled off, once it was executed.
I doubt that it is doing that, although it would be possible.
|
|
|
|
|
*lol* before a decade (and more) one complained about the dll hell.
Nowadays I have the strange feeling it became much worst...
... VS which one now?
... .NET x/y/z/core this and that, which one now?
... Nuget I changed here and there

|
|
|
|
|
It merely morphed from DLL hell into NuGet hell.
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Calvin (Bill Watterson, Calvin & Hobbes)
|
|
|
|
|
The end of DLL hell was a sales pitch. Different names these days. Same principle.
Jeremy Falcon
|
|
|
|
|
I always thought a question like this is a newbish thing to ask but it’s not. To figure it out you have to know something about what Windows does internally in the first place
|
|
|
|
|
dandy72 wrote: I'm looking at over 800 instances of that process Not sure if this is a bug or not, but either way VS is bloatware now. It should not take 40GB+ or whatever it is for an IDE.
Jeremy Falcon
|
|
|
|
|
|
i was attempting to recall a project name i worked on many years ago as a temp for a large firm . it was an on-site in-service software run on service personnel's ruggedized laptop to aid w/ on-site repair . its acronym was SPDE . i assumed/recalled the 1st three characters stood for Service Personnel Data but could not recall what the E stood for . so i described all this to ChatGBT and requested its logical guess re/ the E and Voila Bingo Presto it suggested "Entry" and "Exchange" of course Exchange! Thank You ChatGBT . btw i happened to meet one of the service personnel some years subsequent and inquired re/ SPDE he stated it was not utilized as it was a total failure apparently despite my best efforts .
|
|
|
|
|
Try to format your message. Nobody is interesting to read 'one unstructured block of text'
E.g, Line brakes helps to structure a text 
|
|
|
|
|
are the periods at the end of each sentence not sufficiently helpful ?
|
|
|
|
|
Nope 
|
|
|
|
|
the only re-format which i can recognize as perhaps not quite up to standard is not placing the sentence beginning w/ "btw ..." in a separate paragraph as it is a separate matter . btw it should be "breaks" . oops 😰 . should have placed that on a separate paragraph .
further this is merely the Lounge . also my post is not a thesis merely a quick story . you're welcome for this being on a separate paragraph per keeping w/ the highest grammatical standards for which the Lounge is known for .
|
|
|
|
|
Please don't take my comment that tragic 
|
|
|
|
|
Aw, the classic, "I was only kidding" defense. Is your attention span so short that you couldn't concentrate for one whole paragraph?
|
|
|
|
|
BernardIE5317 wrote: he stated it was not utilized as it was a total failure apparently despite my best efforts .
I worked on a multi-million dollar project which even while it was being worked it was known it was going to be shelfware.
|
|
|
|
|
I have too many of these to count.
Also the project that I got a huge bonus on for saving like 30k a month. 4 years after I left said company, program is no longer being used.
But one little stupid search utility for a college that I wrote 20 years ago. Still going strong.
To err is human to really elephant it up you need a computer
|
|
|
|