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

feat: implement graph diffing #8807

Merged
merged 15 commits into from
Sep 3, 2023
Merged

feat: implement graph diffing #8807

merged 15 commits into from
Sep 3, 2023

Conversation

runspired
Copy link
Contributor

@runspired runspired commented Aug 28, 2023

This currently passes the Graph tests and mostly passes the main test suite.

The implementation here is almost certainly less than ideal, but the shape is mostly correct and surfaces enough information that we ought to be able to use it for further passes at improving performance of updating ManyArray / updating the backing state / avoiding unneeded work.

TODO before merge

  • Test resetOnRemoteUpdate flag
  • Graph tests around local patching / inverse patching behavior
  • Test deprecation off paths assert
  • Notification tests around local patching / inverse patching behavior
  • Add capability or assert to Cache for belongsTo save return disagreeing with saved payload

@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 Aug 28, 2023
@github-actions
Copy link

github-actions bot commented Aug 28, 2023

Performance Report for cdc1c4c

Scenario - basic-record-materialization: ✅ Performance improved

✅ duration
phase estimated improvement -209ms [-270ms to -162ms] OR -6.12% [-7.91% to -4.75%]
☑️ Phase [navigationStart] => [start-data-generation]
phase no difference [-3ms to 1ms]
☑️ Phase [start-data-generation] => [start-push-payload]
phase no difference [-8ms to 2ms]
✅ Phase [start-push-payload] => [start-peek-records]
phase estimated improvement -145ms [-162ms to -128ms] OR -7.77% [-8.69% to -6.88%]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [-1ms to 0ms]
✅ Phase [start-record-materialization] => [end-record-materialization]
phase estimated improvement -206ms [-235ms to -42ms] OR -23.06% [-26.3% to -4.7%]
☑️ Phase [end-record-materialization] => [Test End]
phase no difference [0ms to 16ms]

Scenario - relationship-materialization-simple: ✅ Performance improved

✅ duration
phase estimated improvement -24ms [-34ms to -14ms] OR -2.16% [-3.11% to -1.26%]
☑️ Phase [navigationStart] => [start-find-all]
phase no difference [-1ms to 2ms]
✅ Phase [start-find-all] => [start-materialization]
phase estimated improvement -5ms [-10ms to 0ms] OR -1.18% [-2.33% to -0.01%]
✅ Phase [start-materialization] => [end-materialization]
phase estimated improvement -20ms [-27ms to -13ms] OR -4.09% [-5.48% to -2.69%]
☑️ Phase [end-materialization] => [Test End]
phase no difference [0ms to 3ms]

Scenario - relationship-materialization-complex: ✅ Performance improved

✅ duration
phase estimated improvement -76ms [-122ms to -32ms] OR -1.61% [-2.57% to -0.68%]
☑️ Phase [navigationStart] => [start-data-generation]
phase no difference [-1ms to 3ms]
☑️ Phase [start-data-generation] => [start-push-payload]
phase no difference [-4ms to 1ms]
✅ Phase [start-push-payload] => [start-peek-records]
phase estimated improvement -72ms [-82ms to -61ms] OR -7.99% [-9.04% to -6.7%]
☑️ Phase [start-peek-records] => [start-record-materialization]
phase no difference [0ms to 0ms]
☑️ Phase [start-record-materialization] => [start-relationship-materialization]
phase no difference [-5ms to 5ms]
☑️ Phase [start-relationship-materialization] => [end-relationship-materialization]
phase no difference [-64ms to 21ms]
☑️ Phase [end-relationship-materialization] => [Test End]
phase no difference [0ms to 13ms]

Scenario - unload: ✅ Performance improved

✅ duration
phase estimated improvement -105ms [-114ms to -96ms] OR -9.75% [-10.56% to -8.91%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-6ms to 1ms]
✅ Phase [start-push-payload] => [start-unload-records]
phase estimated improvement -49ms [-55ms to -43ms] OR -8.44% [-9.53% to -7.34%]
✅ Phase [start-unload-records] => [end-unload-records]
phase estimated improvement -53ms [-56ms to -50ms] OR -25.94% [-27.58% to -24.39%]
☑️ Phase [end-unload-records] => [Test End]
phase no difference [0ms to 0ms]

Scenario - unload-all: ✅ Performance improved

✅ duration
phase estimated improvement -98ms [-116ms to -79ms] OR -3.89% [-4.62% to -3.16%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-8ms to 0ms]
✅ Phase [start-push-payload] => [start-materialization]
phase estimated improvement -97ms [-109ms to -85ms] OR -8.28% [-9.27% to -7.25%]
☑️ Phase [start-materialization] => [start-unload-all]
phase no difference [-5ms to 7ms]
☑️ Phase [start-unload-all] => [end-unload-all]
phase no difference [-8ms to 5ms]
☑️ Phase [end-unload-all] => [Test End]
phase no difference [0ms to 1ms]

Scenario - destroy: ✅ Performance improved

✅ duration
phase estimated improvement -89ms [-101ms to -78ms] OR -8.44% [-9.54% to -7.35%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-4ms to 3ms]
✅ Phase [start-push-payload] => [start-destroy-records]
phase estimated improvement -49ms [-56ms to -41ms] OR -8.53% [-9.7% to -7.13%]
✅ Phase [start-destroy-records] => [end-destroy-records]
phase estimated improvement -41ms [-45ms to -37ms] OR -21.41% [-23.68% to -19.29%]
⚠️ Phase [end-destroy-records] => [Test End]
phase estimated regression +1ms [0ms to 1ms] OR +1.8% [0.05% to 3.46%]

Scenario - add-children: ⚠️ Performance regressed

⚠️ duration
phase estimated regression +13ms [5ms to 21ms] OR +1.77% [0.63% to 2.82%]
☑️ Phase [navigationStart] => [start-push-initial-payload]
phase no difference [-4ms to 4ms]
⚠️ Phase [start-push-initial-payload] => [start-push-update-payload]
phase estimated regression +7ms [3ms to 12ms] OR +3.13% [1.27% to 5.02%]
⚠️ Phase [start-push-update-payload] => [end-push-update-payload]
phase estimated regression +5ms [0ms to 9ms] OR +2.63% [0.25% to 4.46%]
☑️ Phase [end-push-update-payload] => [Test End]
phase no difference [0ms to 1ms]

Scenario - unused-relationships: ✅ Performance improved

✅ duration
phase estimated improvement -50ms [-59ms to -40ms] OR -5.69% [-6.81% to -4.56%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-1ms to 5ms]
✅ Phase [start-push-payload] => [end-push-payload]
phase estimated improvement -52ms [-60ms to -45ms] OR -9.03% [-10.31% to -7.77%]
⚠️ Phase [end-push-payload] => [Test End]
phase estimated regression +1ms [0ms to 2ms] OR +3.51% [1.36% to 5.84%]

Baltazore added a commit to Baltazore/deprecation-app that referenced this pull request Aug 30, 2023
@runspired runspired merged commit 3473596 into main Sep 3, 2023
26 of 29 checks passed
@delete-merged-branch delete-merged-branch bot deleted the graph-diffing branch September 3, 2023 22:32
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
Status: Completed
Development

Successfully merging this pull request may close these issues.

1 participant