Skip to content

Commit b6960f4

Browse files
Fabio Carballofacebook-github-bot
authored andcommitted
Enable preallocaiton in Comments Mount Content
Summary: There were a lot of mount content which were not preallocation eligible (and that is why likely the QE didn't show improvements in the first place). Reviewed By: jettbow Differential Revision: D53040284 fbshipit-source-id: ebf5498f3f00ab2da39a881b5f3f5fde7726de73
1 parent a3578d1 commit b6960f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

litho-core/src/main/java/com/facebook/litho/LayoutState.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ void preAllocateMountContent(boolean shouldPreallocatePerMountSpec) {
344344

345345
if (mEnableDrawablePreallocation || isMountableView(treeNode.getRenderUnit())) {
346346

347+
if (isTracing) {
348+
ComponentsSystrace.beginSection("preallocateMount: " + component.getSimpleName());
349+
}
350+
347351
boolean preallocated =
348352
MountItemsPool.maybePreallocateContent(
349353
mResolveResult.context.getAndroidContext(),
@@ -354,6 +358,10 @@ void preAllocateMountContent(boolean shouldPreallocatePerMountSpec) {
354358
"Preallocation of "
355359
+ component.getSimpleName()
356360
+ (preallocated ? " succeeded" : " failed"));
361+
362+
if (isTracing) {
363+
ComponentsSystrace.endSection();
364+
}
357365
}
358366
}
359367
}

0 commit comments

Comments
 (0)