From 11983973310990d88a70b148ce05ae600ca48167 Mon Sep 17 00:00:00 2001 From: Viviana Torres Guerra Date: Tue, 21 Jan 2025 23:16:18 -0800 Subject: [PATCH] Updating ZoomableComponent allocator to create the litho views in the background thread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: # Context - Reels Tab Pinch to Zoom launch backtest has been regressing FVRE, Scroll perf along other metrics [[post]](https://fb.workplace.com/groups/119084311158843/permalink/451425104591427/) - We are updating the component as per fbcbl recommendation in an attempt to mitigate these issues and fully launch the feature. # What’s next Public test targeting this update in v365. Reviewed By: zielinskimz Differential Revision: D68447468 fbshipit-source-id: e377f159411eab6d18fff2f1ba4c83d9d74037af --- .../com/facebook/litho/widget/zoomable/ZoomableComponent.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litho-zoomable/src/main/kotlin/com/facebook/litho/widget/zoomable/ZoomableComponent.kt b/litho-zoomable/src/main/kotlin/com/facebook/litho/widget/zoomable/ZoomableComponent.kt index 5cc40203724..105db0adf13 100644 --- a/litho-zoomable/src/main/kotlin/com/facebook/litho/widget/zoomable/ZoomableComponent.kt +++ b/litho-zoomable/src/main/kotlin/com/facebook/litho/widget/zoomable/ZoomableComponent.kt @@ -100,9 +100,8 @@ class ZoomableComponent( } companion object { - private val ALLOCATOR: ViewAllocator = ViewAllocator { context -> - LithoZoomableView(context) - } + private val ALLOCATOR: ViewAllocator = + ViewAllocator(canPreallocate = true, poolSize = 5) { context -> LithoZoomableView(context) } } }