perf: optimize various teardown hotpaths
Par2 of #9966 this unrolls some loops and prevents some unnecessary scheduling churn and eliminates an unnecessary 2x growth on the legacy support map
Performance Report for fb631c121c65dbb8b9dc6604c4fead3ec51f8714
Scenario - basic-record-materialization: ☑️ Performance is stable
☑️ duration phase no difference [-18ms to 24ms] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 1ms] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-1ms to 2ms] ☑️ Phase [start-push-payload] => [start-peek-records] phase no difference [-8ms to 13ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ☑️ Phase [start-record-materialization] => [end-record-materialization] phase no difference [-14ms to 11ms] ☑️ Phase [end-record-materialization] => [Test End] phase no difference [0ms to 1ms]
Scenario - complex-record-materialization: ✅ Performance improved
✅ duration phase estimated improvement -7ms [-13ms to -2ms] OR -0.68% [-1.18% to -0.18%] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 0ms] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-3ms to 1ms] ✅ Phase [start-push-payload] => [start-peek-records] phase estimated improvement -5ms [-8ms to -1ms] OR -0.83% [-1.45% to -0.22%] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ☑️ Phase [start-record-materialization] => [end-record-materialization] phase no difference [-2ms to 2ms] ☑️ 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 [-8ms to 6ms] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 1ms] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-2ms to 2ms] ☑️ Phase [start-push-payload] => [start-peek-records] phase no difference [-5ms to 4ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ☑️ Phase [start-record-materialization] => [start-field-access] phase no difference [-2ms to 2ms] ☑️ Phase [start-field-access] => [start-relationship-access] phase no difference [0ms to 0ms] ☑️ 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 is stable
☑️ duration phase no difference [-5ms to 2ms] ☑️ Phase [navigationStart] => [start-find-all] phase no difference [0ms to 1ms] ☑️ Phase [start-find-all] => [start-materialization] phase no difference [-2ms to 2ms] ✅ Phase [start-materialization] => [end-materialization] phase estimated improvement -2ms [-3ms to 0ms] OR -1.23% [-2.44% to -0.14%] ☑️ Phase [end-materialization] => [Test End] phase no difference [0ms to 0ms]
Scenario - relationship-materialization-complex: ☑️ Performance is stable
☑️ duration phase no difference [-15ms to 36ms] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 1ms] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-1ms to 4ms] ☑️ Phase [start-push-payload] => [start-peek-records] phase no difference [-5ms to 5ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ☑️ Phase [start-record-materialization] => [start-relationship-materialization] phase no difference [-2ms to 2ms] ☑️ Phase [start-relationship-materialization] => [start-push-payload2] phase no difference [-1ms to 28ms] ☑️ Phase [start-push-payload2] => [start-relationship-materialization2] phase no difference [-6ms to 2ms] ☑️ Phase [start-relationship-materialization2] => [end-relationship-materialization2] phase no difference [-3ms to 2ms] ☑️ Phase [end-relationship-materialization2] => [Test End] phase no difference [-3ms to 1ms]
Scenario - unload: ☑️ Performance is stable
☑️ duration phase no difference [-2ms to 4ms] ☑️ Phase [navigationStart] => [start-push-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-payload] => [start-unload-records] phase no difference [-1ms to 3ms] ☑️ Phase [start-unload-records] => [end-unload-records] phase no difference [-1ms to 1ms] ☑️ Phase [end-unload-records] => [Test End] phase no difference [0ms to 0ms]
Scenario - unload-all: ☑️ Performance is stable
☑️ duration phase no difference [-4ms to 10ms] ⚠️ Phase [navigationStart] => [start-push-payload] phase estimated regression +1ms [0ms to 2ms] OR +0.53% [0.04% to 1.01%] ☑️ Phase [start-push-payload] => [start-materialization] phase no difference [-6ms to 2ms] ☑️ Phase [start-materialization] => [start-unload-all] phase no difference [-2ms to 5ms] ☑️ Phase [start-unload-all] => [end-unload-all] phase no difference [-1ms to 6ms] ☑️ Phase [end-unload-all] => [Test End] phase no difference [-1ms to 1ms]
Scenario - destroy: ☑️ Performance is stable
☑️ duration phase no difference [0ms to 7ms] ☑️ Phase [navigationStart] => [start-push-payload] phase no difference [-1ms to 0ms] ☑️ Phase [start-push-payload] => [start-destroy-records] phase no difference [-1ms to 3ms] ⚠️ Phase [start-destroy-records] => [end-destroy-records] phase estimated regression +2ms [1ms to 3ms] OR +3.2% [0.92% to 5.43%] ☑️ Phase [end-destroy-records] => [Test End] phase no difference [0ms to 3ms]
Scenario - add-children: ☑️ Performance is stable
☑️ duration phase no difference [-4ms to 1ms] ☑️ Phase [navigationStart] => [start-push-initial-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-initial-payload] => [start-push-update-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-update-payload] => [end-push-update-payload] phase no difference [-2ms to 1ms] ☑️ Phase [end-push-update-payload] => [Test End] phase no difference [0ms to 0ms]
Scenario - unused-relationships: ⚠️ Performance regressed
⚠️ duration phase estimated regression +3ms [1ms to 6ms] OR +0.85% [0.24% to 1.49%] ⚠️ Phase [navigationStart] => [start-push-payload] phase estimated regression +1ms [0ms to 2ms] OR +0.91% [0.26% to 1.58%] ☑️ Phase [start-push-payload] => [end-push-payload] phase no difference [-1ms to 3ms] ☑️ Phase [end-push-payload] => [Test End] phase no difference [0ms to 1ms]
Scenario - update-with-same-state: ☑️ Performance is stable
☑️ duration phase no difference [-10ms to 5ms] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 1ms] ☑️ 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 1ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ☑️ Phase [start-record-materialization] => [start-relationship-materialization] phase no difference [-1ms to 1ms] ☑️ Phase [start-relationship-materialization] => [start-local-removal] phase no difference [-5ms to 3ms] ☑️ Phase [start-local-removal] => [start-push-minus-one-payload] phase no difference [-2ms to 0ms] ☑️ Phase [start-push-minus-one-payload] => [start-local-addition] phase no difference [0ms to 0ms] ☑️ Phase [start-local-addition] => [start-push-plus-one-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-plus-one-payload] => [end-push-plus-one-payload] phase no difference [-1ms to 1ms] ☑️ Phase [end-push-plus-one-payload] => [Test End] phase no difference [0ms to 0ms]
Scenario - update-with-same-state-m2m: ☑️ Performance is stable
☑️ duration phase no difference [-1ms to 8ms] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 1ms] ☑️ Phase [start-data-generation] => [start-push-initial-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-initial-payload] => [start-peek-records] phase no difference [0ms 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 0ms] ☑️ 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 estimated regression +2ms [0ms to 3ms] OR +1.61% [0.41% to 2.85%] ☑️ Phase [start-push-plus-one-payload] => [end-push-plus-one-payload] phase no difference [0ms to 1ms] ☑️ Phase [end-push-plus-one-payload] => [Test End] phase no difference [0ms to 1ms]
Commit v Release Performance Report for fb631c121c65dbb8b9dc6604c4fead3ec51f8714
Scenario - basic-record-materialization: ⚠️ Performance regressed
⚠️ duration phase estimated regression +24ms [10ms to 39ms] OR +1.49% [0.63% to 2.36%] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [0ms to 2ms] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-1ms to 2ms] ⚠️ Phase [start-push-payload] => [start-peek-records] phase estimated regression +25ms [16ms to 34ms] OR +2.73% [1.75% to 3.78%] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ☑️ Phase [start-record-materialization] => [end-record-materialization] phase no difference [-14ms to 0ms] ☑️ Phase [end-record-materialization] => [Test End] phase no difference [0ms to 1ms]
Scenario - complex-record-materialization: ✅ Performance improved
✅ duration phase estimated improvement -8ms [-15ms to -3ms] OR -0.75% [-1.3% to -0.24%] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 1ms] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-1ms to 3ms] ☑️ Phase [start-push-payload] => [start-peek-records] phase no difference [-8ms to 2ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ✅ Phase [start-record-materialization] => [end-record-materialization] phase estimated improvement -8ms [-10ms to -6ms] OR -7.64% [-9.56% to -5.71%] ☑️ Phase [end-record-materialization] => [Test End] phase no difference [0ms to 1ms]
Scenario - complex-record-materialization-with-relationship-materialization: ☑️ Performance is stable
☑️ duration phase no difference [-11ms to 3ms] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [0ms to 1ms] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-2ms to 2ms] ☑️ Phase [start-push-payload] => [start-peek-records] phase no difference [-2ms to 7ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ✅ Phase [start-record-materialization] => [start-field-access] phase estimated improvement -6ms [-8ms to -4ms] OR -5.87% [-7.75% to -4.02%] ☑️ Phase [start-field-access] => [start-relationship-access] phase no difference [-1ms to 1ms] ☑️ 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 -7ms [-11ms to -4ms] OR -1.66% [-2.44% to -0.86%] ☑️ Phase [navigationStart] => [start-find-all] phase no difference [0ms to 1ms] ⚠️ Phase [start-find-all] => [start-materialization] phase estimated regression +4ms [2ms to 6ms] OR +2.15% [1.11% to 3.19%] ✅ Phase [start-materialization] => [end-materialization] phase estimated improvement -12ms [-14ms to -9ms] OR -7.75% [-9.36% to -6.37%] ☑️ Phase [end-materialization] => [Test End] phase no difference [0ms to 1ms]
Scenario - relationship-materialization-complex: ☑️ Performance is stable
☑️ duration phase no difference [-41ms to 5ms] ✅ Phase [navigationStart] => [start-data-generation] phase estimated improvement -1ms [-2ms to 0ms] OR -1.41% [-2.67% to -0.05%] ☑️ Phase [start-data-generation] => [start-push-payload] phase no difference [-2ms to 2ms] ☑️ Phase [start-push-payload] => [start-peek-records] phase no difference [-1ms to 7ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ✅ Phase [start-record-materialization] => [start-relationship-materialization] phase estimated improvement -14ms [-16ms to -12ms] OR -9.76% [-11.12% to -8.18%] ☑️ Phase [start-relationship-materialization] => [start-push-payload2] phase no difference [-21ms to 10ms] ☑️ Phase [start-push-payload2] => [start-relationship-materialization2] phase no difference [-5ms to 2ms] ✅ Phase [start-relationship-materialization2] => [end-relationship-materialization2] phase estimated improvement -7ms [-9ms to -5ms] OR -4.41% [-5.94% to -3.01%] ⚠️ Phase [end-relationship-materialization2] => [Test End] phase estimated regression +6ms [5ms to 8ms] OR +3.89% [2.89% to 5.06%]
Scenario - unload: ⚠️ Performance regressed
⚠️ duration phase estimated regression +5ms [2ms to 8ms] OR +1.05% [0.37% to 1.61%] ☑️ Phase [navigationStart] => [start-push-payload] phase no difference [0ms to 2ms] ⚠️ Phase [start-push-payload] => [start-unload-records] phase estimated regression +2ms [0ms to 5ms] OR +1.09% [0.03% to 2.18%] ☑️ Phase [start-unload-records] => [end-unload-records] phase no difference [0ms to 3ms] ☑️ Phase [end-unload-records] => [Test End] phase no difference [0ms to 1ms]
Scenario - unload-all: ✅ Performance improved
✅ duration phase estimated improvement -81ms [-91ms to -69ms] OR -6.13% [-6.91% to -5.28%] ☑️ Phase [navigationStart] => [start-push-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-payload] => [start-materialization] phase no difference [-10ms to 1ms] ✅ Phase [start-materialization] => [start-unload-all] phase estimated improvement -25ms [-29ms to -21ms] OR -10.18% [-11.67% to -8.47%] ✅ Phase [start-unload-all] => [end-unload-all] phase estimated improvement -47ms [-51ms to -43ms] OR -17.83% [-19.37% to -16.24%] ✅ Phase [end-unload-all] => [Test End] phase estimated improvement -5ms [-6ms to -4ms] OR -12.41% [-14.29% to -10.64%]
Scenario - destroy: ☑️ Performance is stable
☑️ duration phase no difference [0ms to 8ms] ☑️ Phase [navigationStart] => [start-push-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-payload] => [start-destroy-records] phase no difference [-2ms to 3ms] ✅ Phase [start-destroy-records] => [end-destroy-records] phase estimated improvement -2ms [-4ms to 0ms] OR -2.91% [-6.14% to -0.21%] ⚠️ Phase [end-destroy-records] => [Test End] phase estimated regression +7ms [1ms to 11ms] OR +26.32% [2.92% to 37.69%]
Scenario - add-children: ⚠️ Performance regressed
⚠️ duration phase estimated regression +5ms [2ms to 8ms] OR +1.29% [0.49% to 2.16%] ☑️ Phase [navigationStart] => [start-push-initial-payload] phase no difference [-2ms to 1ms] ☑️ Phase [start-push-initial-payload] => [start-push-update-payload] phase no difference [0ms to 2ms] ⚠️ Phase [start-push-update-payload] => [end-push-update-payload] phase estimated regression +5ms [2ms to 6ms] OR +4.25% [2.19% to 6.03%] ☑️ Phase [end-push-update-payload] => [Test End] phase no difference [0ms to 0ms]
Scenario - unused-relationships: ☑️ Performance is stable
☑️ duration phase no difference [-2ms to 4ms] ☑️ Phase [navigationStart] => [start-push-payload] phase no difference [-1ms to 1ms] ☑️ Phase [start-push-payload] => [end-push-payload] phase no difference [-2ms to 4ms] ☑️ Phase [end-push-payload] => [Test End] phase no difference [-1ms to 0ms]
Scenario - update-with-same-state: ✅ Performance improved
✅ duration phase estimated improvement -16ms [-22ms to -9ms] OR -1.37% [-1.9% to -0.78%] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [0ms to 2ms] ☑️ Phase [start-data-generation] => [start-push-initial-payload] phase no difference [0ms to 1ms] ☑️ Phase [start-push-initial-payload] => [start-peek-records] phase no difference [0ms to 3ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ✅ Phase [start-record-materialization] => [start-relationship-materialization] phase estimated improvement -5ms [-6ms to -4ms] OR -7.34% [-9.2% to -5.44%] ✅ Phase [start-relationship-materialization] => [start-local-removal] phase estimated improvement -16ms [-21ms to -11ms] OR -5.03% [-6.58% to -3.62%] ⚠️ Phase [start-local-removal] => [start-push-minus-one-payload] phase estimated regression +7ms [3ms to 12ms] OR +2.14% [0.85% to 3.55%] ☑️ Phase [start-push-minus-one-payload] => [start-local-addition] phase no difference [0ms to 0ms] ✅ Phase [start-local-addition] => [start-push-plus-one-payload] phase estimated improvement -1ms [-2ms to 0ms] OR -3.17% [-5.21% to -1.08%] ✅ Phase [start-push-plus-one-payload] => [end-push-plus-one-payload] phase estimated improvement -2ms [-3ms to -1ms] OR -2.85% [-4.6% to -1.12%] ☑️ Phase [end-push-plus-one-payload] => [Test End] phase no difference [0ms to 0ms]
Scenario - update-with-same-state-m2m: ✅ Performance improved
✅ duration phase estimated improvement -10ms [-14ms to -6ms] OR -1.11% [-1.56% to -0.68%] ☑️ Phase [navigationStart] => [start-data-generation] phase no difference [-1ms to 1ms] ☑️ Phase [start-data-generation] => [start-push-initial-payload] phase no difference [-1ms to 2ms] ☑️ Phase [start-push-initial-payload] => [start-peek-records] phase no difference [-2ms to 1ms] ☑️ Phase [start-peek-records] => [start-record-materialization] phase no difference [0ms to 0ms] ☑️ Phase [start-record-materialization] => [start-relationship-materialization] phase no difference [-1ms to 0ms] ✅ Phase [start-relationship-materialization] => [start-local-removal] phase estimated improvement -1ms [-1ms to 0ms] OR -2.68% [-4.5% to -0.77%] ✅ Phase [start-local-removal] => [start-push-minus-one-payload] phase estimated improvement -6ms [-7ms to -4ms] OR -4.56% [-5.69% to -3.47%] ☑️ Phase [start-push-minus-one-payload] => [start-local-addition] phase no difference [-2ms to 1ms] ✅ Phase [start-local-addition] => [start-push-plus-one-payload] phase estimated improvement -2ms [-3ms to 0ms] OR -1.39% [-2.45% to -0.32%] ☑️ Phase [start-push-plus-one-payload] => [end-push-plus-one-payload] phase no difference [-2ms to 0ms] ☑️ Phase [end-push-plus-one-payload] => [Test End] phase no difference [-1ms to 0ms]