react / react/yoga

Experiment with concept of YGRemeasureFunc

Open
#423 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

Sometimes cached measurements cannot be re-used so we must re-measure a node. Currently we do this by calling the node's measure function again. This is suboptimal for text. In a lot of cases (if the constraints have been relaxed) we can know the new size of the text without calling measure. This requires a YGRemeasureFunc, by default it would just delegate to YGMeasureFunc but for text nodes it could have a more optimal implementation.

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

Trace where cached measurements trigger YGMeasureFunc, then inspect how text nodes are measured when constraints are relaxed. Done means the YGRemeasureFunc concept is resolved, with default delegation and an optimized text-node path that avoids unnecessary measurement where the new size can be determined.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.