{"id":27946,"date":"2024-11-24T10:42:42","date_gmt":"2024-11-24T02:42:42","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27946\/"},"modified":"2024-11-24T10:42:42","modified_gmt":"2024-11-24T02:42:42","slug":"%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8-google-performance-%e9%9d%a2%e6%9d%bf%e5%88%86%e6%9e%90%e9%98%bb%e5%a1%9e%e9%a1%b5%e9%9d%a2%e6%b8%b2%e6%9f%93%e7%9a%84%e4%bb%bb%e5%8a%a1%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27946\/","title":{"rendered":"\u5982\u4f55\u5229\u7528 Google Performance \u9762\u677f\u5206\u6790\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173136996354521.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5229\u7528 Google Performance \u9762\u677f\u5206\u6790\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5229\u7528 Google Performance \u9762\u677f\u5206\u6790\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5206\u6790\u6027\u80fd\u9762\u677f\u67e5\u627e\u963b\u585e\u9875\u9762\u6e32\u67d3\u4efb\u52a1<\/strong><\/p>\n<p>\u4e3a\u4e86\u63d0\u9ad8 Lighthouse \u8bc4\u5206\uff0c\u4f18\u5316\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\u81f3\u5173\u91cd\u8981\u3002\u5728 Google \u7684 Performance \u9762\u677f\u4e2d\uff0c&#8221;L&#8221; \u8868\u793a\u6240\u6709\u8d44\u6e90\u52a0\u8f7d\u5b8c\u6210\u3002\u4e0d\u8fc7\uff0c\u5e76\u4e0d\u662f\u5728\u8fd9\u4e2a\u70b9\u4e4b\u524d\u7684\u4efb\u52a1\u90fd\u963b\u585e\u4e86\u9875\u9762\u6e32\u67d3\u3002<\/p>\n<p>\u8981\u5206\u6790\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\uff0c\u9700\u8981\u5173\u6ce8 Performance \u9762\u677f\u4e2d\u7684 &#8220;Mn&#8221; \u4e3b\u7ebf\u7a0b\u533a\u57df\uff0c\u800c\u4e0d\u662f &#8220;Network&#8221; \u7f51\u7edc\u533a\u57df\u3002\u5728 &#8220;Main&#8221; \u533a\u57df\u4e2d\uff0c\u67e5\u627e\u4e0e\u6e32\u67d3\u76f8\u5173\u7684\u4efb\u52a1\uff0c\u5982\uff1a<\/p>\n<ul>\n<li>Recalculate Style<\/li>\n<li>Layout<\/li>\n<li>Paint<\/li>\n<li>Commit<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u4efb\u52a1\u4e4b\u524d\u7684 JS \u4efb\u52a1\u662f\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p>[Image of Google Performance Panel highlighting Main thread and rendering tasks]<\/p>\n<p>\u901a\u8fc7\u5206\u6790\u8fd9\u4e9b\u963b\u585e\u4efb\u52a1\uff0c\u60a8\u53ef\u4ee5\u4e86\u89e3\u5b83\u4eec\u7684\u6301\u7eed\u65f6\u95f4\u548c\u5f71\u54cd\uff0c\u4ece\u800c\u91c7\u53d6\u63aa\u65bd\u8fdb\u884c\u4f18\u5316\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5229\u7528 Google Performance \u9762\u677f\u5206\u6790\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5206\u6790\u6027\u80fd\u9762\u677f\u67e5\u627e\u963b\u585e\u9875\u9762\u6e32\u67d3\u4efb\u52a1 \u4e3a\u4e86\u63d0\u9ad8 Lighthouse \u8bc4\u5206\uff0c\u4f18\u5316\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\u81f3\u5173\u91cd\u8981\u3002\u5728 Google \u7684 Performance \u9762\u677f\u4e2d\uff0c&#8221;L&#8221; \u8868\u793a\u6240\u6709\u8d44\u6e90\u52a0\u8f7d\u5b8c\u6210\u3002\u4e0d\u8fc7\uff0c\u5e76\u4e0d\u662f\u5728\u8fd9\u4e2a\u70b9\u4e4b\u524d\u7684\u4efb\u52a1\u90fd\u963b\u585e\u4e86\u9875\u9762\u6e32\u67d3\u3002 \u8981\u5206\u6790\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\uff0c\u9700\u8981\u5173\u6ce8 Performance \u9762\u677f\u4e2d\u7684 &#8220;Mn&#8221; \u4e3b\u7ebf\u7a0b\u533a\u57df\uff0c\u800c\u4e0d\u662f &#8220;Network&#8221; \u7f51\u7edc\u533a\u57df\u3002\u5728 &#8220;Main&#8221; \u533a\u57df\u4e2d\uff0c\u67e5\u627e\u4e0e\u6e32\u67d3\u76f8\u5173\u7684\u4efb\u52a1\uff0c\u5982\uff1a Recalculate Style Layout Paint Commit \u8fd9\u4e9b\u4efb\u52a1\u4e4b\u524d\u7684 JS \u4efb\u52a1\u662f\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a [Image of Google Performance Panel highlighting Main thread and rendering tasks] \u901a\u8fc7\u5206\u6790\u8fd9\u4e9b\u963b\u585e\u4efb\u52a1\uff0c\u60a8\u53ef\u4ee5\u4e86\u89e3\u5b83\u4eec\u7684\u6301\u7eed\u65f6\u95f4\u548c\u5f71\u54cd\uff0c\u4ece\u800c\u91c7\u53d6\u63aa\u65bd\u8fdb\u884c\u4f18\u5316\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5229\u7528 Google Performance \u9762\u677f\u5206\u6790\u963b\u585e\u9875\u9762\u6e32\u67d3\u7684\u4efb\u52a1\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-27946","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27946"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27946\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}