feat(yoga): Add cache miss tracking to LayoutData for hit rate metrics - #55824
feat(yoga): Add cache miss tracking to LayoutData for hit rate metrics#55824zubeyralmaho wants to merge 1 commit into
Conversation
|
Hi @zubeyralmaho! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
## Summary Add layoutCacheMisses and measureCacheMisses fields to LayoutData struct to enable cache hit rate calculation in layout performance analysis. ## Motivation Currently Yoga tracks cache hits but not misses, making it impossible to calculate cache efficiency. This change enables: hitRate = cachedLayouts / (cachedLayouts + layoutCacheMisses) ## Changes - Added layoutCacheMisses and measureCacheMisses to LayoutData struct - Track cache misses in calculateLayoutInternal() when cache lookup fails ## Test Plan - Built Yoga library successfully - Verified first layout has cache misses - Verified second layout (same dimensions) has cache hits - Cache hit rate is now calculable
c9fe00f to
fe37280
Compare
|
This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label. |
|
This PR was closed because it has been stalled for 7 days with no activity. |
1 similar comment
|
This PR was closed because it has been stalled for 7 days with no activity. |
PR: feat(yoga): Add cache miss tracking to LayoutData for hit rate metrics
Summary
Add
layoutCacheMissesandmeasureCacheMissesfields to Yoga'sLayoutDatastruct to enable cache hit rate calculation in layout performance analysis.Currently, Yoga tracks cache hits (
cachedLayouts,cachedMeasures) but not cache misses. This makes it impossible to calculate cache efficiency metrics like hit rate percentage.With this change, consumers of the
LayoutPassEndevent can now compute:This enables better performance profiling and optimization insights for React Native apps.
Changelog: [INTERNAL] [ADDED] - Add cache miss tracking to Yoga LayoutData for hit rate metrics
Test Plan
cmakeandmakeImpact