{"id":102522,"date":"2019-05-28T07:00:00","date_gmt":"2019-05-28T14:00:00","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/oldnewthing\/?p=102522"},"modified":"2019-05-28T06:22:51","modified_gmt":"2019-05-28T13:22:51","slug":"20190528-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20190528-00\/?p=102522","title":{"rendered":"Why does Explorer&#8217;s <I>New<\/I> menu take so long to appear the first time I open it?"},"content":{"rendered":"<p>When you right-click on an empty space in an Explorer folder and select the <i>New<\/i> menu item, there is sometimes a delay of up to two seconds before the menu appears. What&#8217;s going on during that delay?<\/p>\n<p>The items in the <i>New<\/i> menu are discovered by <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/shell\/context#extending-the-new-submenu\"> looking for <code>Shell\u00adNew<\/code> subkeys<\/a> in <code>HKEY_<\/code><code>CLASSES_<\/code><code>ROOT<\/code>.<\/p>\n<p>This search takes some time, seeing as <code>HKEY_<\/code><code>CLASSES_<\/code><code>ROOT<\/code> is a rather large registry key. The <i>New<\/i> menu starts a background task to collect all the information and waits up to two seconds for it to report results. If the task doesn&#8217;t finish within two seconds, then the <i>New<\/i> menu gives up waiting and merely shows the result from the previous time the task ran, hoping that no new items were added in the meantime.<\/p>\n<p>Meanwhile, the task continues to run and eventually completes with a list of items. If it finishes in time, the <i>New<\/i> menu will use it right away. Otherwise, it is saved for the <i>New<\/i> menu to use next time.<\/p>\n<p>This is the <a href=\"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20171121-00\/?p=97435\"> similar sort of nonsense we went through with the COM component category catalog<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s trying to figure out what new things it can do.<\/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":[104],"class_list":["post-102522","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-tipssupport"],"acf":[],"blog_post_summary":"<p>It&#8217;s trying to figure out what new things it can do.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/102522","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=102522"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/102522\/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=102522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=102522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=102522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}