Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OnLayoutCalculated component lifecycle method #786

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tjaneczko
Copy link
Contributor

@tjaneczko tjaneczko commented Apr 22, 2021

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 tjaneczko force-pushed the yoga-measure-lifecycle-method branch from 7ab4216 to 316383d Compare April 23, 2021 00:03
@tjaneczko tjaneczko marked this pull request as ready for review April 23, 2021 17:09
@tjaneczko
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants