litho icon indicating copy to clipboard operation
litho copied to clipboard

Add OnLayoutCalculated component lifecycle method

Open tjaneczko opened this issue 3 years ago • 1 comments

Summary

This PR adds an OnLayoutCalculated component lifecycle method, which allows LayoutSpec components to be notified when the Yoga layout calculation has completed. This is useful for measuring performance and debugging LayoutSpecs with regards to the amount of time their layout calculation takes.

Changelog

  • New: Add OnLayoutCalculated LayoutSpec component lifecycle method.

Test Plan

Added unit tests to the LayoutSpecLifecycleTest and ran them with:

./gradlew :litho-it:testDebug --tests com.facebook.litho.LayoutSpecLifecycleTest*

tjaneczko avatar Apr 22 '21 23:04 tjaneczko

Is there any chance someone could take a look at this PR? Thanks!

tjaneczko avatar May 24 '21 22:05 tjaneczko