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

perf: faster iteration of relationship payloads #9762

Merged
merged 1 commit into from
Mar 12, 2025
Merged

Conversation

runspired
Copy link
Contributor

wheeee

@runspired runspired added 🎯 canary PR is targeting canary (default) 🏷️ perf PRs that improve performance in a notable way ci-perf Activates Performance Checks in CI labels Mar 12, 2025
Copy link

Performance Report for c08e537

Scenario - basic-record-materialization: ✅ Performance improved

✅ duration
phase estimated improvement -35ms [-50ms to -21ms] OR -2.22% [-3.16% to -1.35%]
☑️ Phase [navigationStart] => [start-data-generation]
phase no difference [0ms to 1ms]
☑️ Phase [start-data-generation] => [start-push-payload]
phase no difference [0ms to 2ms]
☑️ Phase [start-push-payload] => [start-peek-records]
phase no difference [-5ms to 14ms]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [0ms to 0ms]
✅ Phase [start-record-materialization] => [end-record-materialization]
phase estimated improvement -41ms [-48ms to -33ms] OR -10.69% [-12.53% to -8.78%]
☑️ Phase [end-record-materialization] => [Test End]
phase no difference [0ms to 0ms]

Scenario - complex-record-materialization: ☑️ Performance is stable

☑️ duration
phase no difference [-4ms to 16ms]
☑️ Phase [navigationStart] => [start-data-generation]
phase no difference [-1ms to 1ms]
☑️ Phase [start-data-generation] => [start-push-payload]
phase no difference [-2ms to 1ms]
☑️ Phase [start-push-payload] => [start-peek-records]
phase no difference [-11ms to 5ms]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [0ms to 0ms]
⚠️ Phase [start-record-materialization] => [end-record-materialization]
phase estimated regression +11ms [9ms to 14ms] OR +11.59% [9.11% to 14.38%]
☑️ Phase [end-record-materialization] => [Test End]
phase no difference [0ms to 0ms]

Scenario - complex-record-materialization-with-relationship-materialization: ☑️ Performance is stable

☑️ duration
phase no difference [-11ms to 2ms]
⚠️ Phase [navigationStart] => [start-data-generation]
phase estimated regression +1ms [0ms to 1ms] OR +0.88% [0.13% to 1.6%]
☑️ Phase [start-data-generation] => [start-push-payload]
phase no difference [0ms to 3ms]
✅ Phase [start-push-payload] => [start-peek-records]
phase estimated improvement -8ms [-14ms to -2ms] OR -1.34% [-2.33% to -0.36%]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [0ms to 0ms]
⚠️ Phase [start-record-materialization] => [start-field-access]
phase estimated regression +13ms [12ms to 14ms] OR +13.54% [12.18% to 14.92%]
✅ Phase [start-field-access] => [start-relationship-access]
phase estimated improvement -11ms [-12ms to -10ms] OR -22.43% [-24.18% to -20.37%]
☑️ Phase [start-relationship-access] => [end-relationship-access]
phase no difference [0ms to 0ms]
☑️ Phase [end-relationship-access] => [Test End]
phase no difference [0ms to 0ms]

Scenario - relationship-materialization-simple: ✅ Performance improved

✅ duration
phase estimated improvement -4ms [-8ms to 0ms] OR -0.72% [-1.5% to -0.02%]
☑️ Phase [navigationStart] => [start-find-all]
phase no difference [0ms to 1ms]
✅ Phase [start-find-all] => [start-materialization]
phase estimated improvement -4ms [-6ms to -2ms] OR -1.94% [-2.9% to -0.94%]
✅ Phase [start-materialization] => [end-materialization]
phase estimated improvement -27ms [-29ms to -25ms] OR -12.62% [-13.71% to -11.57%]
⚠️ Phase [end-materialization] => [Test End]
phase estimated regression +27ms [27ms to 28ms] OR +102.84% [100.55% to 105.24%]

Scenario - relationship-materialization-complex: ☑️ Performance is stable

☑️ duration
phase no difference [-46ms to 38ms]
☑️ Phase [navigationStart] => [start-data-generation]
phase no difference [-1ms to 0ms]
☑️ Phase [start-data-generation] => [start-push-payload]
phase no difference [-3ms to 2ms]
✅ Phase [start-push-payload] => [start-peek-records]
phase estimated improvement -22ms [-29ms to -15ms] OR -5.39% [-7.01% to -3.58%]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [0ms to 0ms]
⚠️ Phase [start-record-materialization] => [start-relationship-materialization]
phase estimated regression +27ms [22ms to 31ms] OR +19.13% [15.67% to 22.52%]
☑️ Phase [start-relationship-materialization] => [start-push-payload2]
phase no difference [-34ms to 14ms]
☑️ Phase [start-push-payload2] => [start-relationship-materialization2]
phase no difference [0ms to 11ms]
☑️ Phase [start-relationship-materialization2] => [end-relationship-materialization2]
phase no difference [-1ms to 8ms]
✅ Phase [end-relationship-materialization2] => [Test End]
phase estimated improvement -4ms [-7ms to -2ms] OR -2.57% [-4.16% to -1.09%]

Scenario - unload: ✅ Performance improved

✅ duration
phase estimated improvement -27ms [-30ms to -23ms] OR -5.21% [-5.9% to -4.49%]
✅ Phase [navigationStart] => [start-push-payload]
phase estimated improvement -1ms [-1ms to 0ms] OR -0.42% [-0.82% to -0.03%]
☑️ Phase [start-push-payload] => [start-unload-records]
phase no difference [-4ms to 1ms]
✅ Phase [start-unload-records] => [end-unload-records]
phase estimated improvement -25ms [-27ms to -22ms] OR -19.01% [-20.24% to -16.81%]
☑️ Phase [end-unload-records] => [Test End]
phase no difference [-1ms to 0ms]

Scenario - unload-all: ✅ Performance improved

✅ duration
phase estimated improvement -13ms [-19ms to -6ms] OR -1.05% [-1.59% to -0.46%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-2ms to 0ms]
☑️ Phase [start-push-payload] => [start-materialization]
phase no difference [-7ms to 0ms]
✅ Phase [start-materialization] => [start-unload-all]
phase estimated improvement -7ms [-9ms to -5ms] OR -3.78% [-4.96% to -2.62%]
☑️ Phase [start-unload-all] => [end-unload-all]
phase no difference [-1ms to 5ms]
☑️ Phase [end-unload-all] => [Test End]
phase no difference [-1ms to 0ms]

Scenario - destroy: ☑️ Performance is stable

☑️ duration
phase no difference [0ms to 7ms]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [0ms to 1ms]
☑️ Phase [start-push-payload] => [start-destroy-records]
phase no difference [-2ms to 2ms]
☑️ Phase [start-destroy-records] => [end-destroy-records]
phase no difference [-3ms to 0ms]
⚠️ Phase [end-destroy-records] => [Test End]
phase estimated regression +2ms [0ms to 9ms] OR +6.23% [1.58% to 32.79%]

Scenario - add-children: ✅ Performance improved

✅ duration
phase estimated improvement -3ms [-5ms to -1ms] OR -0.8% [-1.48% to -0.15%]
✅ Phase [navigationStart] => [start-push-initial-payload]
phase estimated improvement -1ms [-1ms to 0ms] OR -0.44% [-0.85% to -0.05%]
✅ Phase [start-push-initial-payload] => [start-push-update-payload]
phase estimated improvement -5ms [-7ms to -3ms] OR -5.3% [-6.93% to -3.43%]
⚠️ Phase [start-push-update-payload] => [end-push-update-payload]
phase estimated regression +3ms [2ms to 5ms] OR +3.32% [1.63% to 4.91%]
☑️ Phase [end-push-update-payload] => [Test End]
phase no difference [0ms to 0ms]

Scenario - unused-relationships: ☑️ Performance is stable

☑️ duration
phase no difference [-5ms to 3ms]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-1ms to 1ms]
☑️ Phase [start-push-payload] => [end-push-payload]
phase no difference [-4ms to 2ms]
☑️ Phase [end-push-payload] => [Test End]
phase no difference [0ms to 0ms]

Scenario - update-with-same-state: ✅ Performance improved

✅ duration
phase estimated improvement -8ms [-15ms to -1ms] OR -0.74% [-1.39% to -0.07%]
☑️ Phase [navigationStart] => [start-data-generation]
phase no difference [0ms to 1ms]
☑️ Phase [start-data-generation] => [start-push-initial-payload]
phase no difference [0ms to 1ms]
✅ Phase [start-push-initial-payload] => [start-peek-records]
phase estimated improvement -2ms [-4ms to -1ms] OR -2.35% [-3.88% to -0.97%]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [0ms to 0ms]
⚠️ Phase [start-record-materialization] => [start-relationship-materialization]
phase estimated regression +19ms [18ms to 20ms] OR +37.47% [35.21% to 39.86%]
✅ Phase [start-relationship-materialization] => [start-local-removal]
phase estimated improvement -22ms [-26ms to -18ms] OR -6.7% [-7.91% to -5.51%]
☑️ Phase [start-local-removal] => [start-push-minus-one-payload]
phase no difference [0ms to 3ms]
⚠️ Phase [start-push-minus-one-payload] => [start-local-addition]
phase estimated regression +1ms [0ms to 1ms] OR +5.91% [3.56% to 9.28%]
✅ Phase [start-local-addition] => [start-push-plus-one-payload]
phase estimated improvement -2ms [-3ms to -1ms] OR -4.15% [-6.52% to -1.92%]
✅ Phase [start-push-plus-one-payload] => [end-push-plus-one-payload]
phase estimated improvement -8ms [-9ms to -7ms] OR -10.51% [-12.2% to -8.98%]
☑️ Phase [end-push-plus-one-payload] => [Test End]
phase no difference [-1ms to 0ms]

Scenario - update-with-same-state-m2m: ☑️ Performance is stable

☑️ duration
phase no difference [-5ms to 5ms]
☑️ Phase [navigationStart] => [start-data-generation]
phase no difference [-1ms to 0ms]
☑️ Phase [start-data-generation] => [start-push-initial-payload]
phase no difference [-1ms to 0ms]
☑️ Phase [start-push-initial-payload] => [start-peek-records]
phase no difference [-1ms to 2ms]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [0ms to 0ms]
☑️ Phase [start-record-materialization] => [start-relationship-materialization]
phase no difference [0ms to 0ms]
☑️ Phase [start-relationship-materialization] => [start-local-removal]
phase no difference [0ms to 1ms]
☑️ Phase [start-local-removal] => [start-push-minus-one-payload]
phase no difference [-1ms to 2ms]
☑️ Phase [start-push-minus-one-payload] => [start-local-addition]
phase no difference [-1ms to 1ms]
☑️ Phase [start-local-addition] => [start-push-plus-one-payload]
phase no difference [0ms to 2ms]
☑️ Phase [start-push-plus-one-payload] => [end-push-plus-one-payload]
phase no difference [0ms to 2ms]
☑️ Phase [end-push-plus-one-payload] => [Test End]
phase no difference [0ms to 0ms]

@runspired runspired merged commit c710024 into main Mar 12, 2025
32 of 36 checks passed
@runspired runspired deleted the iterable-metrics branch March 12, 2025 09:31
MehulKChaudhari pushed a commit to MehulKChaudhari/ember-data that referenced this pull request Mar 16, 2025
gitKrystan pushed a commit that referenced this pull request Mar 21, 2025
gitKrystan added a commit that referenced this pull request Mar 21, 2025
* feat: schema type utils (#9757)

* minor type improvements

* chore: fixup types

* add api docs

* nice things

* account for schema presence

* cleanup test

* chore: update contributing docs (#9758)

* chore: Improve contributing experience (#9759)

* chore: improve developing experience on local

* more

* temporarily deactivate some scenarios

* deactivate more lints

* deactivate more prod tests

* another

* chore: reduce simple Map/Set ops (#9761)

* perf: faster iteration of relationship payloads (#9762)

faster iteration of payloads

* chore: restructure SchemaRecord test file layout to make it easier to navigate (#9763)

* chore: simplify test file layout

* chore: move polaris test files to new structure

* docs: LinksMode and Polymorphic Relationship Guide, stubs out guide for LegacyMode vs PolarisMode (#9764)

* docs: stub out guides for SchemaRecord, LinksMode, PolarisMode etc.

* add linksmode guide

* fix annotation

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* Update guides/relationships/features/links-mode.md

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* cleanup op

* rewrite future thoughts

* stub out more of the guide

* add docs on polymorphism

* stub out guide

* add note on interop

* add reactivity overview

---------

Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>

* feat: improve debuggability of SchemaRecord, RecordArray and Identifier (#9766)

* feat: improve debuggability of SchemaRecord, RecordArray and Identifier

* fix configurability

* fix keys

* feat: persist runtime config (#9767)

* feat: persist runtime config

* ensure fastboot works

* Don't set isDirty to true in diff callbacks (#9765)

* More overnotification fixes

* Fix DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE case

* feat: ensure objects behave amazeballs (#9768)

* feat: ensure objects behave amazeballs

* add tests for record iteration

* add more tests

* fix(deps): update dependency @babel/runtime to v7.26.10 [security] (#9760)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: remove restriction on new field kinds being used with legacy mode

* improve types

* Revert "improve types"

This reverts commit 84daef7.

* Revert "chore: remove restriction on new field kinds being used with legacy mode"

This reverts commit 3fd81bf.

* Widen Peer Range for ember-inflector (#9770)

* chore: remove restriction on new field kinds being used with legacy mode (#9769)

* chore: remove restriction on new field kinds being used with legacy mode

* chore: cleanup types

* fix

* fix test

* fix docs

* chore: cleanup @ember/service deprecation from shipped library code (#9773)

* Add: tests verify behavior mutating a record  (#9754)

* add: tests verify behavior mutating a related record from a checked-out record

* fix: lint

* fix: test

* fix: lint

* fix: better reordering detection when remoteClearsLocal is true (#9771)

* Fix DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE reordering detection

* add failing test

* notification tests

* implement fix

* cleanup console logs

* fix spurrious type issue

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>

* Fix some lint

---------

Co-authored-by: Chris Thoburn <runspired@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jon Johnson <jon.johnson@ucsf.edu>
Co-authored-by: Mehul Kiran Chaudhari <55375534+MehulKChaudhari@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-perf Activates Performance Checks in CI 🎯 canary PR is targeting canary (default) 🏷️ perf PRs that improve performance in a notable way
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant