Ability to recreate yoga trees from JSON captures #1566

Closed
joevilches wants to merge 3 commits from export-D52987588 into main
joevilches commented 2024-01-24 12:30:28 -08:00 (Migrated from github.com)

Summary:
In the previous diffs we serialized the in-memory representation of a node into json. This diff exposes a generateBenchmark method that reads from that json executes the proper public Yoga API functions to recreate the same tree. It then calls calculate layout so that we can time that in the next diff.

This diff is really only focusing on the core aspects of a yoga tree like style, children, and calculating layout; there are still more things to add coming up:

  • Support for configs, experiments, and errata
  • Support for measure functions
  • Support for general node state that is not style (like always forming a containing block)
  • Actually running all of these benchmarks together
  • Tests

Differential Revision: D52987588

Summary: In the previous diffs we serialized the in-memory representation of a node into json. This diff exposes a `generateBenchmark` method that reads from that json executes the proper public Yoga API functions to recreate the same tree. It then calls calculate layout so that we can time that in the next diff. This diff is really only focusing on the core aspects of a yoga tree like style, children, and calculating layout; there are still more things to add coming up: * Support for configs, experiments, and errata * Support for measure functions * Support for general node state that is not style (like always forming a containing block) * Actually running all of these benchmarks together * Tests Differential Revision: D52987588
facebook-github-bot commented 2024-01-24 12:30:45 -08:00 (Migrated from github.com)

This pull request was exported from Phabricator. Differential Revision: D52987588

This pull request was **exported** from Phabricator. Differential Revision: [D52987588](https://www.internalfb.com/diff/D52987588)
vercel[bot] commented 2024-01-24 12:35:04 -08:00 (Migrated from github.com)

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

Name Status Preview Comments Updated (UTC)
yoga-website-next Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2024 8:37pm
[vc]: #fMYIq/VGTOtHw9JLm9dowjl9Ma6EQiGO/sZW2/AyHy8=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ5b2dhLXdlYnNpdGUtbmV4dCIsInJvb3REaXJlY3RvcnkiOiJ3ZWJzaXRlLW5leHQiLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vZmJvcGVuc291cmNlL3lvZ2Etd2Vic2l0ZS1uZXh0Lzk4NmZHbjRDcDFtVzJGRzhMalV5Wm55c2dpR2UiLCJwcmV2aWV3VXJsIjoieW9nYS13ZWJzaXRlLW5leHQtZ2l0LWZvcmstam9ldmlsY2hlcy1leHBvci02NzIxYTktZmJvcGVuc291cmNlLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoieW9nYS13ZWJzaXRlLW5leHQtZ2l0LWZvcmstam9ldmlsY2hlcy1leHBvci02NzIxYTktZmJvcGVuc291cmNlLnZlcmNlbC5hcHAifX1dfQ== **The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more) | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yoga-website-next** | ✅ Ready ([Inspect](https://vercel.com/fbopensource/yoga-website-next/986fGn4Cp1mW2FG8LjUyZnysgiGe)) | [Visit Preview](https://vercel.live/open-feedback/yoga-website-next-git-fork-joevilches-expor-6721a9-fbopensource.vercel.app?via=pr-comment-visit-preview-link&passThrough=1) | 💬 [**Add feedback**](https://vercel.live/open-feedback/yoga-website-next-git-fork-joevilches-expor-6721a9-fbopensource.vercel.app?via=pr-comment-feedback-link) | Jan 24, 2024 8:37pm |
facebook-github-bot commented 2024-02-05 11:52:56 -08:00 (Migrated from github.com)

This pull request has been merged in facebook/yoga@0ca15bdaaa.

This pull request has been merged in facebook/yoga@0ca15bdaaafb09b2f402e2297998b269279f7216.

Pull request closed

Sign in to join this conversation.
No description provided.