systeminformer: Slow loading with "Enable start as admin" enabled

Brief description of your issue

Having “Enable start as admin” enabled, System Informer will load very slowly. Triggering the actual task in Task Scheduler will load the program normally as fast as it should but when clicking on the icon, the load of the program is very slow.

Steps to reproduce (optional)

No response

Expected behavior (optional)

No response

Actual behavior (optional)

No response

Environment (optional)


About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (15 by maintainers)

Most upvoted comments

I added some tracing and I believe I know what’s happening. Previously a mutant was used which guaranteed that one process wins the race and is designated as the “previous instance”. With the changes in the commit mentioned previously two instances can both race to start the “previous instance” but neither of them has created their initial window yet. So the logic above never finds the window and always waits for 5 seconds.

PID     Message
--------------------------------------------------------------------------------
21140	System Informer initializing
21140	InitializeSystemInformation: STATUS_SUCCESS (0x00000000)
21140	HeapInitialization: STATUS_SUCCESS (0x00000000)
21140	Activate previous instance enter
21140	Activate previous instance: STATUS_SUCCESS (0x00000000) exit (elapsed=139036)
21140	Run as admin task enter
21140	Run as admin task: STATUS_SUCCESS (0x00000000) exit (elapsed=32641)
21140	Activate previous instance enter
43612	System Informer initializing
43612	InitializeSystemInformation: STATUS_SUCCESS (0x00000000)
43612	HeapInitialization: STATUS_SUCCESS (0x00000000)
43612	Activate previous instance enter
21140	Foreground previous instance: 43612 enter
43612	Foreground previous instance: 21140 enter
43612	Foreground previous instance: 21140 (50 attempts) exit (elapsed=54496858)
21140	Foreground previous instance: 43612 (50 attempts) exit (elapsed=54600637)
21140	Activate previous instance: STATUS_SUCCESS (0x00000000) exit (elapsed=54739729)
21140	System Informer exiting: STATUS_SUCCESS (0x00000000)
43612	Activate previous instance: STATUS_SUCCESS (0x00000000) exit (elapsed=54633542)