Skip to content

Commit

Permalink
Systrace for pre-allocation optimization
Browse files Browse the repository at this point in the history
Summary: Systrace for pre-allocation optimization

Reviewed By: zielinskimz

Differential Revision: D55369128

fbshipit-source-id: e152f4b74e13cb232b515af128926744518a4d2f
  • Loading branch information
kingsleyadio authored and facebook-github-bot committed Mar 27, 2024
1 parent a66b7c2 commit 01c5450
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class ContentPreAllocator(
hashMapOf())
}

ComponentsSystrace.trace("preAllocateMountContentForTree") {
val suffix = if (avoidRedundantPreAllocations) "(avoidRedundantPreAllocations)" else ""
ComponentsSystrace.trace("preAllocateMountContentForTree$suffix") {
val mountOutputs = nodeSupplier()
preAllocateMountContent(mountOutputs)
}
Expand Down Expand Up @@ -121,7 +122,7 @@ class ContentPreAllocator(
val preallocated =
preAllocator(componentContext.androidContext, treeNode.renderUnit.contentAllocator)
Log.d(
"LayoutState",
"ContentPreAllocator",
"Preallocation of $componentSimpleName" + if (preallocated) " succeeded" else " failed")

if (preallocated && avoidRedundantPreAllocations)
Expand Down

0 comments on commit 01c5450

Please sign in to comment.