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

update:yoga-caching-algorithm #1681

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

admirsaheta
Copy link

Summary:

The pull request optimizes the canUseCachedMeasurement function in the Yoga library by reducing redundant computations, combining conditions where possible, and enhancing readability and performance. These changes aim to improve the efficiency of the function without altering its overall implementation or behavior.

Changelog:

[GENERAL][CHANGED] - Optimized the canUseCachedMeasurement function to reduce redundant computations and improve performance.

Test Plan:

  1. Unit Tests: Ran existing unit tests to ensure the optimized function produces the same results as before.
  2. Performance Tests: Conducted performance tests to measure the execution time of the canUseCachedMeasurement function before and after the optimization.
  3. Code Review: Reviewed the changes to ensure they maintain the original logic and correctness of the function.

The tests confirmed that the optimized function is more efficient while producing the same correct outputs.

Copy link

vercel bot commented Jul 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yoga-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2024 9:17am

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 11, 2024
@efstathiosntonas
Copy link

efstathiosntonas commented Jul 15, 2024

I’ve patched rn 0.74.3 with this change and I’ve encountered weird layout from time time on both iOS and Android.

The layout was tending to move upwards on the screen, eg a flex:1 view could move all the way up and only the bottom part was visible.

In another case on Android only I had 3 elements in a flex direction row alignitems center and the 2 right last elements were moved upwards again whille the left one was positioned fine.

Don’t know if something is missing on my end (maybe there are other yoga commits on 0.75 branch that accompany this one). I thought it worths mentioning it.

Can’t provide repro since my UI is extremely complex. The moment I removed the patch everything went back to normal.

cc: @NickGerleman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants