@pixel @davemark If I understood the post correctly, the problem happens because Windows is doing something with all those UUIDs, which stalls the UI.
First of all, Task Manager should never be affected by that – its purpose is to manage tasks, most commonly used to kill whatever program got stuck.
Taskbar likewise shouldn't deal with those things, at least not unless you specifically click on the flyout to project your screen somewhere (I'm assuming this is where it needs the list of UPnP devices), and even then the projection task shouldn't freeze the whole taskbar.
Settings is a problem, though I don't know why it can't process this asynchronously, like it does with everything else, including stuff that it shouldn't (I regularly have it seemingly not react to a click, then I navigate somewhere else, when the popup from that earlier click finally opens; while this is awful UX, it's exactly what would've helped with the problem at hand).
Plus, if it can't handle a few thousand devices efficiently, maybe the list should be limited in size, and only show eg. last 100 encountered devices.