react / react/yoga

Experiment with smarter layout caching of container nodes

Open
#422 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Algorithm
Dominant language
C++
Stars
18.9k
Forks
1.6k
Avg merge
1m
Merged PRs (30d)
1

Description

Currently leaf nodes have smart measure caching (see YGNodeCanUseCachedMeasurement in Yoga.c) but the measure cache check for containers/subtrees is very basic and just checking if all the input is equal. We could most likely make this much smarter and skip a lot of layouts with the possibility of greatly improving performance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Yoga.c at YGNodeCanUseCachedMeasurement and inspect the existing container/subtree measure-cache check. The issue does not define the smarter caching strategy or specific tests; done would require an agreed approach that safely skips eligible layouts and demonstrates a performance improvement.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.