{"id":302188,"date":"2020-04-20T15:00:29","date_gmt":"2020-04-20T15:00:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302188"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-04-20T15:00:29","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302188","title":{"rendered":"\u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/497988\/\">\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API React Profiler. \u0415\u0449\u0451 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 API Interaction Tracing. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f API User Timing \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c React Movies Queue.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/497986\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5ef\/452\/51a\/5ef45251ae6a761a3fec98e14c4eefa1.jpg\"><\/div>\n<p><\/a><br \/>  <i><font color=\"#999999\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 React Movies Queue<\/font><\/i><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">API React Profiler<\/font><\/h2>\n<p>  <a href=\"https:\/\/reactjs.org\/docs\/profiler.html\">API React Profiler<\/a> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0443\u0437\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<pre><code class=\"javascript\">import React, { Fragment, unstable_Profiler as Profiler} from &quot;react&quot;; <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>Profiler<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043b\u043b\u0431\u044d\u043a <code>onRender<\/code> \u0432 \u0432\u0438\u0434\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u041e\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"javascript\">const Movies = ({ movies, addToQueue }) =&gt; ( \u00a0\u00a0&lt;Fragment&gt; \u00a0\u00a0\u00a0\u00a0&lt;Profiler id=&quot;Movies&quot; onRender={callback}&gt; <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435, \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0446\u0435\u043b\u044f\u0445, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <code>Movies<\/code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/10a\/9d0\/3ec\/10a9d03ece4b7636876ab9b72998dea1.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 React Movies Queue \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 Movies \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 React<\/font><\/i><\/p>\n<p>  \u041a\u043e\u043b\u043b\u0431\u044d\u043a <code>onRender<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0442\u043e, \u0447\u0442\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f, \u0438 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433. \u0421\u044e\u0434\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li><code>id<\/code>: \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>id<\/code> \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <code>Profiler<\/code>, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435.<\/li>\n<li><code>phase<\/code>: \u0438\u043b\u0438 <code>mount<\/code> (\u0435\u0441\u043b\u0438 \u0434\u0435\u0440\u0435\u0432\u043e \u0431\u044b\u043b\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e), \u0438\u043b\u0438 <code>update<\/code> (\u0435\u0441\u043b\u0438 \u0434\u0435\u0440\u0435\u0432\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043e).<\/li>\n<li><code>actualDuration<\/code>: \u0432\u0440\u0435\u043c\u044f, \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.<\/li>\n<li><code>baseDuration<\/code>: \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u0430 \u0431\u0435\u0437 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li><code>startTime<\/code>: \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 React \u043d\u0430\u0447\u0430\u043b \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.<\/li>\n<li><code>commitTime<\/code>: \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0433\u0434\u0430 React \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b \u044d\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435.<\/li>\n<li><code>interactions<\/code>: \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u00ab\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439\u00bb \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">const callback = (id, phase, actualTime, baseTime, startTime, commitTime) =&gt; { \u00a0\u00a0\u00a0\u00a0console.log(`${id}'s ${phase} phase:`); \u00a0\u00a0\u00a0\u00a0console.log(`Actual time: ${actualTime}`); \u00a0\u00a0\u00a0\u00a0console.log(`Base time: ${baseTime}`); \u00a0\u00a0\u00a0\u00a0console.log(`Start time: ${startTime}`); \u00a0\u00a0\u00a0\u00a0console.log(`Commit time: ${commitTime}`); } <\/code><\/pre>\n<p>  \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Chrome. \u0422\u0430\u043c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/cc8\/baf\/9c9\/cc8baf9c9500419f587874bae69acf96.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/font><\/i><\/p>\n<p>  \u041c\u044b, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 React, \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0443 <code>Profiler<\/code> \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u0432\u0438\u0434\u0435 flame-\u0433\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c56\/138\/d61\/c56138d6154866df33b45014966aa2cb.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 React<\/font><\/i><\/p>\n<p>  \u041c\u043d\u0435, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0443\u0442 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 <code>Ranked<\/code>, \u0433\u0434\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0445\u043e\u0434\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/224\/324\/1b6\/2243241b6de115dbbd7c0a94270d3868.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 Ranked<\/font><\/i><\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 <code>Profiler<\/code>:<\/p>\n<pre><code class=\"javascript\">import React, { Fragment, unstable_Profiler as Profiler} from &quot;react&quot;;  render( \u00a0\u00a0&lt;App&gt; \u00a0\u00a0\u00a0\u00a0&lt;Profiler id=&quot;Header&quot; onRender={callback}&gt; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;Header {...props} \/&gt; \u00a0\u00a0\u00a0\u00a0&lt;\/Profiler&gt; \u00a0\u00a0\u00a0\u00a0&lt;Profiler id=&quot;Movies&quot; onRender={callback}&gt; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;Movies {...props} \/&gt; \u00a0\u00a0\u00a0\u00a0&lt;\/Profiler&gt; \u00a0\u00a0&lt;\/App&gt; ); <\/code><\/pre>\n<p>  \u0410 \u043a\u0430\u043a \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438?<\/p>\n<h2><font color=\"#3AC1EF\">API Interaction Tracing<\/font><\/h2>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0432\u0440\u043e\u0434\u0435 \u0449\u0435\u043b\u0447\u043a\u043e\u0432 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c). \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432\u0440\u043e\u0434\u0435 \u0442\u0430\u043a\u043e\u0433\u043e: \u00ab\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 DOM \u043f\u043e\u0441\u043b\u0435 \u0449\u0435\u043b\u0447\u043a\u0430 \u043f\u043e \u044d\u0442\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435?\u00bb. \u041a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 React \u0435\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API Interaction Tracing \u0438\u0437 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 <a href=\"https:\/\/www.npmjs.com\/package\/scheduler\">scheduler<\/a>. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/www.npmjs.com\/package\/scheduler\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u0421\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043d\u0430\u0431\u0436\u0430\u044e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u00ab\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0449\u0451\u043b\u043a\u043d\u0443\u043b \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443\u00bb) \u0438 \u043e\u0442\u043c\u0435\u0442\u043a\u0430\u043c\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043b\u043b\u0431\u044d\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0442\u043e\u043c\u0443 \u0438\u043b\u0438 \u0438\u043d\u043e\u043c\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430 <code>Add Movie To Queue<\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u043e\u043a <code>+<\/code>. \u041e\u043d\u0430 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/6f7\/75c\/af2\/6f775caf25ad484e73ae70354752b879.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u041a\u043d\u043e\u043f\u043a\u0430 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0438\u043b\u044c\u043c\u0430 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430<\/font><\/i><\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c:<\/p>\n<pre><code class=\"javascript\">import { unstable_Profiler as Profiler } from &quot;react&quot;; import { render } from &quot;react-dom&quot;; import { unstable_trace as trace } from &quot;scheduler\/tracing&quot;;  class MyComponent extends Component { \u00a0\u00a0addMovieButtonClick = event =&gt; { \u00a0\u00a0\u00a0\u00a0trace(&quot;Add To Movies Queue click&quot;, performance.now(), () =&gt; { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0this.setState({ itemAddedToQueue: true }); \u00a0\u00a0\u00a0\u00a0}); \u00a0\u00a0}; } <\/code><\/pre>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u0431 \u044d\u0442\u043e\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0438 \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0435\u0433\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u0440\u0430\u0442\u0438\u0432\u0448\u0438\u0441\u044c \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 React.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d93\/fc1\/ea0\/d93fc1ea00661d926e2f9a183b32ebb7.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/font><\/i><\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e API Interaction Tracing \u043c\u043e\u0436\u043d\u043e, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043f\u0435\u0440\u0432\u043e\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"javascript\">import { unstable_trace as trace } from &quot;scheduler\/tracing&quot;;  trace(&quot;initial render&quot;, performance.now(), () =&gt; { \u00a0\u00a0\u00a0ReactDom.render(&lt;App \/&gt;, document.getElementById(&quot;app&quot;)); }); <\/code><\/pre>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b3c\/4ab\/310\/b3c4ab310fd105fc83697e4a7b5a61fb.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/font><\/i><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 API \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 <a href=\"https:\/\/gist.github.com\/bvaughn\/8de925562903afd2e7a12554adcdda16\">\u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/a> \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<h2><font color=\"#3AC1EF\">Puppeteer<\/font><\/h2>\n<p>  \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 <a href=\"https:\/\/developers.google.com\/web\/tools\/puppeteer\">Puppeteer<\/a>. \u042d\u0442\u043e \u2014 Node.js-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0451\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c\u0443 API, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c Chrome \u0431\u0435\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 DevTools.<\/p>\n<p>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Puppeteer \u0432 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 <a href=\"https:\/\/pptr.dev\/#?product=Puppeteer&amp;version=v2.1.1&amp;show=api-tracingstartoptions\">\u043c\u0435\u0442\u043e\u0434\u044b<\/a> <code>tracing.start()<\/code> \u0438 <code>tracing.stop()<\/code>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 DevTools. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u0449\u0435\u043b\u0447\u043a\u0435 \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0439 \u043d\u0430\u0441 \u043a\u043d\u043e\u043f\u043a\u0435.<\/p>\n<pre><code class=\"javascript\">const puppeteer = require('puppeteer');  (async () =&gt; { \u00a0\u00a0const browser = await puppeteer.launch(); \u00a0\u00a0const page = await browser.newPage(); \u00a0\u00a0const navigationPromise = page.waitForNavigation(); \u00a0\u00a0await page.goto('https:\/\/react-movies-queue.glitch.me\/') \u00a0\u00a0await page.setViewport({ width: 1276, height: 689 }); \u00a0\u00a0await navigationPromise;  \u00a0\u00a0const addMovieToQueueBtn = 'li:nth-child(3) &gt; .card &gt; .card__info &gt; div &gt; .button'; \u00a0\u00a0await page.waitForSelector(addMovieToQueueBtn);  \u00a0\u00a0\/\/ \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f... \u00a0\u00a0await page.tracing.start({ path: 'profile.json' }); \u00a0\u00a0\/\/ \u0429\u0435\u043b\u0447\u043e\u043a \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 \u00a0\u00a0await page.click(addMovieToQueueBtn); \u00a0\u00a0\/\/ \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u00a0\u00a0await page.tracing.stop();  \u00a0\u00a0await browser.close(); })() <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0432 \u0444\u0430\u0439\u043b <code>profile.json<\/code> \u0432 \u043f\u0430\u043d\u0435\u043b\u044c <code>Performance<\/code> \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e, \u0432\u044b\u0437\u043e\u0432 \u043a\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3ed\/42f\/623\/3ed42f62350db7d110d4ba53c80973b6.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0439 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443<\/font><\/i><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u2014 \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/calendar.perfplanet.com\/2019\/javascript-component-level-cpu-costs\/\">\u044d\u0442\u043e\u0442<\/a> \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b.<\/p>\n<h2><font color=\"#3AC1EF\">API User Timing<\/font><\/h2>\n<p>  <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/User_Timing_API\">API User Timing<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0442\u043e\u0447\u043d\u044b\u0435 \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041c\u0435\u0442\u043e\u0434 <code>window.performance.mark()<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u043c\u0435\u0442\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u044f. \u041c\u0435\u0442\u043e\u0434 <code>window.performance.measure()<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<pre><code class=\"javascript\">\/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0437\u0430\u0434\u0430\u0447\u0438 performance.mark('Movies:updateStart'); \/\/ \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438  \/\/ \u0417\u0430\u043f\u0438\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 performance.mark('Movies:updateEnd');  \/\/ \u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u0435\u0436\u0434\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 performance.measure('moviesRender', 'Movies:updateStart', 'Movies:updateEnd'); <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u0443\u044f React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438 <code>Performance<\/code> \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Chrome, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0440\u0430\u0437\u0434\u0435\u043b <code>Timing<\/code>, \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u043c\u0438\u0441\u044f React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. React, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u0443\u043c\u0435\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API User Timing.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ed0\/f07\/ebb\/ed0f07ebb5939839c088bc5d56e4b330.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0417\u0430\u043a\u043b\u0430\u0434\u043a\u0430 Performance \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Chrome<\/font><\/i><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u0437 DEV-\u0441\u0431\u043e\u0440\u043e\u043a React \u0443\u0431\u0438\u0440\u0430\u044e\u0442 API User Timings, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0435\u0433\u043e \u043d\u0430 API React Profiler, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u0435 \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u044d\u0442\u043e\u0433\u043e API \u0432\u0435\u0440\u043d\u0443\u0442, \u0441\u0434\u0435\u043b\u0430\u0432 \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u0435\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e User Timing Level 3.\u00a0<\/p>\n<p>  \u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0432\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c\u0441\u044f React-\u0441\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 API User Timing \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a. \u0421\u044e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0445\u043e\u0434\u0438\u0442 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 Reddit <code>Time to first post title visible<\/code> \u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0430 Spotify <code>Time to playback ready<\/code>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/18a\/28a\/c19\/18a28ac19bf3b14050cde0731cf09e71.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u041e\u0441\u043e\u0431\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043d\u0430 React-\u0441\u0430\u0439\u0442\u0430\u0445<\/font><\/i><\/p>\n<p>  \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043c\u0435\u0442\u0440\u0438\u043a, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 API User Timing, \u0443\u0434\u043e\u0431\u043d\u043e <a href=\"https:\/\/web.dev\/user-timings\/\">\u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f<\/a> \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 <a href=\"https:\/\/developers.google.com\/web\/tools\/lighthouse\/\">Lighthouse<\/a> \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Chrome.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b1\/b97\/961\/9b1b979616527fd88511ecbadcd0a260.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 Lighthouse<\/font><\/i><\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u0441\u0432\u0435\u0436\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 <a href=\"https:\/\/nextjs.org\/\">Next.js<\/a> <a href=\"https:\/\/github.com\/zeit\/next.js\/pull\/8069\">\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b<\/a> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u2014 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445:<\/p>\n<ul>\n<li><code>Next.js-hydration<\/code>: \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/li>\n<li><code>Next.js-nav-to-render<\/code>: \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430.<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 <code>Timings<\/code>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/248\/8c5\/ee9\/2488c5ee9d6bd6ccf9da8e6c36436c26.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0410\u043d\u0430\u043b\u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a Next.js<\/font><\/i><\/p>\n<h2><font color=\"#3AC1EF\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438 Lighthouse<\/font><\/h2>\n<p>  \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e Lighthouse \u0438 \u043f\u0430\u043d\u0435\u043b\u044c <code>Performance<\/code> \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 Chrome \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ce2\/5c7\/2ee\/ce25c72eedd5c79edd5dbc1a42685b10.jpg\"><\/div>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/p>\n<p>  \u0422\u0435\u043c, \u043a\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 React, \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432 \u0438\u0445 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <a href=\"https:\/\/web.dev\/tbt\/\">Total Blocking Time<\/a> (TBT), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u0451\u0442 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0440\u0435\u0431\u044b\u0432\u0430\u0435\u0442 \u0432 \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u043e \u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 (<a href=\"https:\/\/web.dev\/tti\/\">Time to Interactive<\/a>). \u0412\u043e\u0442 \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 TBT (\u00ab\u0434\u043e\u00bb \u0438 \u00ab\u043f\u043e\u0441\u043b\u0435\u00bb) \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c \u0441\u0440\u0435\u0434\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b7\/074\/96d\/9b707496d500da0883027da3a571a030.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 TBT<\/font><\/i><\/p>\n<p>  \u042d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0443\u0437\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0445, \u043a\u0430\u043a <a href=\"https:\/\/web.dev\/long-tasks-devtools\/\">\u0437\u0430\u0434\u0430\u0447\u0438<\/a>, \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0445\u043e\u0434\u0438\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043e\u043a.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/98b\/3ac\/803\/98b3ac8031d84cdfb9765fde2f399a70.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/font><\/i><\/p>\n<p>  Lighthouse, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u0430\u0451\u0442 React-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043c\u0430\u0441\u0441\u0443 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432 <a href=\"https:\/\/github.com\/GoogleChrome\/lighthouse\/releases\">Lighthouse 6.0<\/a>. \u0417\u0434\u0435\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442 \u0440\u0430\u0437\u0434\u0435\u043b <a href=\"https:\/\/web.dev\/remove-unused-code\/\">Remove unused JavaScript<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u043e \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c JavaScript-\u043a\u043e\u0434\u0435, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u043e\u043c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>React.lazy()<\/code>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/1e3\/9b2\/f3a\/1e39b2f3a323a74744ee16e68550c6c2.jpg\"><\/div>\n<p>  <i><font color=\"#999999\">\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Lighthouse<\/font><\/i><\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u043c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0443 \u0435\u0433\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u042f \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0441\u044c \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u043d\u0430 <a href=\"https:\/\/webpagetest.org\/easy\">Webpagetest<\/a> \u0438 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 <a href=\"https:\/\/web.dev\/user-centric-performance-metrics\/#in-the-field\">RUM<\/a> \u0438 <a href=\"https:\/\/web.dev\/chrome-ux-report\/\">CrUX<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043c\u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  <b>\u0423\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/b> \u041a\u0430\u043a \u0432\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0438\u0445 React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439?<\/p>\n<p>  <a href=\"https:\/\/ruvds.com\/ru-rub\/#order\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iq\/fi\/b4\/iqfib45pgphfrxv--zfemt0qnmw.jpeg\"><\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/497988\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/497988\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/497988\/\">\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API React Profiler. \u0415\u0449\u0451 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 API Interaction Tracing. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f API User Timing \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438 \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c React Movies Queue.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/497986\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5ef\/452\/51a\/5ef45251ae6a761a3fec98e14c4eefa1.jpg\"><\/div>\n<p><\/a><br \/>  <i><font color=\"#999999\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 React Movies Queue<\/font><\/i>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-302188","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=302188"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302188\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}