Add more init perf markers

Summary:
Adding some more systrace markers to track load application and the initial bits of MarketplaceHomeApp.

There are a couple big segments worth pointing out with timing from a local `__DEV__: false` run:

* JSBundleRequireTime_end -> BundlePreInitializeCore_start: 360ms
* MobileConfigModuleInit: 210ms
* renderApplication_React_render_start -> MarketplaceHomeAppConstructorSuper_start: 180ms
* MarketplaceHomeAppGetQueryParamsForCachedTopPicks: 100ms

I'm not sure what we can do about any of these except for MarketplaceHomeAppGetQueryParamsForCachedTopPicks where we could break the query params out into a separate file so we don't have to load this 11-thousand-line behemoth just so we can get this snippet:

diffusion/FBS/browse/master/xplat/js/RKJSModules/Apps/Wilde/Marketplace/apps/__generated__/MarketplaceHomeAppQuery.graphql.js$11831-11837

But maybe we have to load it anyway and the query just needs to be optimized (or maybe Relay can optimize the format here).

Reviewed By: yungsters

Differential Revision: D13969695

fbshipit-source-id: 4f39efa6cb591b814687bfe51b02ad92048f1c21
This commit is contained in:
Spencer Ahrens
2019-02-11 16:26:00 -08:00
committed by Facebook Github Bot
parent 48ba44087f
commit 864a30185d

View File

@@ -11,6 +11,7 @@
'use strict';
const AppContainer = require('AppContainer');
import PerformanceLogger from 'PerformanceLogger';
const React = require('React');
const ReactFabricIndicator = require('ReactFabricIndicator');
@@ -53,11 +54,13 @@ function renderApplication<Props: Object>(
renderable = <ConcurrentMode>{renderable}</ConcurrentMode>;
}
PerformanceLogger.startTimespan('renderApplication_React_render');
if (fabric) {
require('ReactFabric').render(renderable, rootTag);
} else {
require('ReactNative').render(renderable, rootTag);
}
PerformanceLogger.stopTimespan('renderApplication_React_render');
}
module.exports = renderApplication;