How come the same Windows API that creates icons works fast after reboot and becomes extremely slow an hour later after C2 application was launched a hundred times?
I've no idea. Maybe it's a memory leak in Windows or something. It could be antivirus or Windows Defender or some other tool on the system interfering.
[quote:3nrgmglq]So here is an uneducated speculation - maybe all these icons from every C2 session are cached or indexed or something like that, and this cache/index never gets reset?
AFAIK that's impossible. The operating system forcibly removes all the processes' memory when the app is closed. There is no way to keep any behind, so there is no way a cache could be left behind either.
As for the meltdown/spectre patches, AFAIK there are actually a number of patches going out, including microcode updates for CPUs. (I'm not sure if those can even be uninstalled!) It may be that it's a different patch that is responsible, but it's pretty rare that any OS update has any noticable negative performance impact, and it seems everyone suddenly started noticing a slowdown around the time the whole meltdown/spectre thing was being reported, so it does seem to line up pretty well.
Anyway, even if it's a different patch, and we eventually figure out which one it is exactly... there still might not be anything we can do. We could rearchitect the whole icon engine to asynchronously create icons in the background or something, but that is a massive amount of work, likely comes with a slew of nasty cache invalidation or race condition bugs, and we simply don't have the resources for it. Meanwhile you can just use "Don't show unique icons" which appears to entirely bypass the issue. So, sorry folks, not sure we're going to be able to do anything on this one.
For the record, this is categorically an issue with Windows. Unless the dialog still takes a long time to appear with "Don't show unique icons", then any delay is entirely in Windows, and there is no question about whether it's in C2. I also can't resist pointing out the great irony that people accuse us of depending on third parties too much with HTML5, but you can't get away from third parties on native either!