Compartir a través de


SetThreadPriority from Run key

If you add an application to the Run key in the registry (HKLM\Software\Microsoft\Windows\CurrentVersion\Run), you'll notice that its threads are kept at Normal priority. You can call SetThreadPriority all day long, but it won't make a difference: the priority of the thread is kept at Normal (to be precise, it is for about a minute or so after which the call to SetThreadPriority(THREAD_PRIORITY_HIGHEST ) will actually succeed in bumping up its priority level).

The upside is that Vista will be responsive quicker to start programs that are initiated by the user. Programs that added themselves to the Run key had a tendency to deem themselves more important than the competition and they would stumble over each other to initialize first. Since an application would be an automatic loser in the elbow race if it kept its priority at Normal, it appeared to start sluggish. By assisting all startup-at-logon applications to play fair, at least the end-user can have a responsive machine quicker.

This also applies to applications added to the Startup folder.

Maarten

Comments