mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add systrace sections to core
Summary: I'm hunting down the source of a perf regression on a screen and think that having these systrace sections could be handy for this and future investigations. Changelog: [internal] Reviewed By: mdvacca Differential Revision: D29802969 fbshipit-source-id: f4030261da8888ddeb32ae41b9cf2b25af6a5583
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b0e39b2ed9
commit
24d91268b6
@@ -260,7 +260,9 @@ void Binding::startSurface(
|
||||
animationDriver_);
|
||||
|
||||
{
|
||||
SystraceSection s2("FabricUIManagerBinding::startSurface::surfaceId::lock");
|
||||
std::unique_lock<better::shared_mutex> lock(surfaceHandlerRegistryMutex_);
|
||||
SystraceSection s3("FabricUIManagerBinding::startSurface::surfaceId");
|
||||
surfaceHandlerRegistry_.emplace(surfaceId, std::move(surfaceHandler));
|
||||
}
|
||||
}
|
||||
@@ -319,7 +321,11 @@ void Binding::startSurfaceWithConstraints(
|
||||
animationDriver_);
|
||||
|
||||
{
|
||||
SystraceSection s2(
|
||||
"FabricUIManagerBinding::startSurfaceWithConstraints::surfaceId::lock");
|
||||
std::unique_lock<better::shared_mutex> lock(surfaceHandlerRegistryMutex_);
|
||||
SystraceSection s3(
|
||||
"FabricUIManagerBinding::startSurfaceWithConstraints::surfaceId");
|
||||
surfaceHandlerRegistry_.emplace(surfaceId, std::move(surfaceHandler));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user