{"id":93395,"date":"2016-05-02T07:00:00","date_gmt":"2016-05-02T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=93395"},"modified":"2019-03-13T11:02:34","modified_gmt":"2019-03-13T18:02:34","slug":"20160502-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20160502-00\/?p=93395","title":{"rendered":"Startup apps start up when I tell them"},"content":{"rendered":"<p>I remember some magazine article about Windows 8, and it talked about how fast Windows 8 started up compared to Windows 7. The way they measured it was by putting a shortcut to Notepad in the Startup group, then booting the computer, and timing how long before the Notepad window opened. <\/p>\n<p>I laughed at this metric because <i>I<\/i> control when startup groups start up. As in me, personally. <\/p>\n<p>The Explorer startup sequence has a number of phases, carefully arranged to get visible things ready first, and less visible things ready later. And one of the lowest priority items is the Startup group. <\/p>\n<p>In fact, even after everything is finished initializing, there is a bonus extra delay before the Startup group gets processed. We&#8217;ve found that one of the big frustrations people have with Windows is that after signing in, they can&#8217;t use the computer because all of the Startup programs are thrashing the computer. Launching all the programs in the Startup group and similar auto-start locations (like the Run key) means that you have a dozen programs all trying to load themselves off the disk, which thrashes the computer so hard that the user can&#8217;t even open the Start menu. <\/p>\n<p>There have been a variety of approaches taken to mitigate the impact of auto-start programs. One trick was to <a HREF=\"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20110817-00\/?p=9883\">run auto-start programs in a box that keeps them at low CPU and disk priority<\/a> for 60 seconds. In Windows 8, one new trick was to delay launching the next program until the previous one has settled down, where &#8220;settled down&#8221; means &#8220;stopped consuming a lot of CPU and disk I\/O bandwidth.&#8221; Another trick was simply to wait longer before starting the auto-start programs in the first place. <\/p>\n<p>Measuring how long it takes for Notepad to open is in large part simply a way of extracting the parameter I passed to the <code>Sleep<\/code> function. <\/p>\n<p>I could have made Windows boot faster or slower according to their metrics by simply tweaking how long I slept before firing up the auto-start programs. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s not really a useful performance metric.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-93395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>It&#8217;s not really a useful performance metric.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/93395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=93395"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/93395\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=93395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=93395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=93395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}