Visual Studio Attach To Process takes a -long- time to show up
Visual Studio 2015
In Visual Studio 2015 the attach process dialog doesn't open until all the processes are ready. This has been changed in more recent versions to open immediately and then progressively show the processes as they become ready.
Quoting a support response from the Visual Studio Team
Visual Studio 2015 wouldn't open the dialog until the list of processes was ready, but for 2017 we changed the dialog to open immediately and show the processes list once it is ready.
Source: Visual Studio Developer Community: Attach to process really slow
So I suspect that there may be something else related to the machine that is slowing down the processes.
The machine
Now you say it's on one machine and with all things being equal with your Visual Studio usage, settings, project type, etc. Then it's likely an issue with your machine.
I've had similar difficulties with all my windows machines over the years. They start off fast and then end up painfully slow for developing. The fact the problem is rectified on reboot, indicates there's some issue, perhaps a memory leak? that's causing the pc to slow down.
What I would do to attempt to improve performance:
- Go through all the startup programs and disable most of them.
- Uninstall any third party security software. They take up a hideous amount of processing. Use the inbuilt Windows 10 security features.
- Ensure the pc is regularly defragmented and unused files are deleted.
- Check task manager for which processes are using up the CPU or memory (or disk). There may be things that can be done if you find the troublesome area.
- Reinstall Visual Studio and it's dependencies from scratch.
- Reinstall Windows and then reinstall VS.
- The pc may not be adequate for the job. Upgrade or even better replace it.
I switched from Windows to Mac earlier this year, as I'd had enough of the bugs in Windows and the gradual decrease in performance. I forked out for a brilliant machine and haven't looked back.
The up and download speeds alone, on the same network as the Windows machine is 10 times faster. Everything about it is faster. The CPU on the Windows running on Parallels is actually faster. I can have Android studio stable, plus the beta open and run Visual Studio on Parallels, have chrome running and many other smaller apps and it will run faster.
I'll come back to you if this changes, but I honestly think it's a superior machine, OS, and hardware. This is coming from using State of the Art Windows machines. The best Windows machine was a gaming laptop, for performance. It too deteriorated until it just stopped working.
I solved this in VS2017 15.5, (most likely) by uninstalling support for NodeJS and Python in VS. I got the idea when reading about someone who solved it by uninstalling PowerShell tools, which I didn't have installed.
I used the connection type default, but noticed some new connection types in the drop-down, for example, Python and NodeJS.
I trimmed away some stuff from my VS installation that I don't really use at the moment, nodejs and python support and also Azure and Boost & Google test support. After that, it was fast and smooth again. It's a bit sad that the performance is affected by the unselected connection types as it seems, I hope it will get fixed soon.
See if Python installed as Visual Studio Workloads. If yes, then Uninstall Python Workload. Its easy to uninstall workloads. Open Visual studio installer
Uncheck the checkbox for Python and click modify button. It will take a while. When setup is finished. You are good to go.