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: record.destroyRecord should also unload the record #7258

Merged
merged 6 commits into from
May 12, 2021

Conversation

snewcomer
Copy link
Contributor

@snewcomer snewcomer commented Jul 31, 2020

close #5006
close #5455

Port of changes from #7217

@snewcomer snewcomer self-assigned this Jul 31, 2020
@github-actions
Copy link

github-actions bot commented Jul 31, 2020

Asset Size Report for 053aaf4

IE11 Builds

🛑 The size of the library EmberData has increased by +5.31 KB (+860.0 B compressed) which exceeds the failure threshold of 75 bytes.

Warnings

⚠️ The uncompressed size of the package @ember-data/model has increased by +7.43 KB.

Changeset


EmberData +194.88 KB +5.31 KB (+40.02 KB +860.0 B compressed)
    @ember-data/store +81.41 KB -2.12 KB (+16.72 KB -343.34 B compressed)
        @ember-data/store/-private +80.5 KB -2.12 KB (+16.53 KB -343.34 B compressed)
    @ember-data/model +28.69 KB +7.43 KB (+5.89 KB +1.18 KB compressed)
        @ember-data/model/-private +28.21 KB +7.43 KB (+5.79 KB +1.18 KB compressed)

Full Asset Analysis (IE11)

Asset Size Report
=================


Library: EmberData
┌────────────┬─────────────┐
│  (index)   │   Values    │
├────────────┼─────────────┤
│   bytes    │ '194.88 KB' │
│ compressed │ '40.02 KB'  │
│  packages  │      8      │
│  modules   │     44      │
└────────────┴─────────────┘

Package: @ember-data/store
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '81.41 KB' │
│  compressed  │ '16.72 KB' │
│ % Of Library │   '41.8'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/store/-private                        | 80.50 KB  | 16.53 KB   | 98.9          | 41.3
	@ember-data/store/index                           | 936.00 B  | 192.22 B   | 1.1           | 0.5

Package: @ember-data/model
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '28.69 KB' │
│  compressed  │ '5.89 KB'  │
│ % Of Library │   '14.7'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/model/-private                        | 28.21 KB  | 5.79 KB    | 98.3          | 14.5
	@ember-data/model/index                           | 486.00 B  | 99.80 B    | 1.7           | 0.2

Package: @ember-data/record-data
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '25.14 KB' │
│  compressed  │ '5.16 KB'  │
│ % Of Library │   '12.9'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/record-data/-private                  | 25.14 KB  | 5.16 KB    | 100.0         | 12.9

Package: @ember-data/serializer
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '20.82 KB' │
│  compressed  │ '4.28 KB'  │
│ % Of Library │   '10.7'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/serializer/json                       | 7.75 KB   | 1.59 KB    | 37.2          | 4.0
	@ember-data/serializer/-private                   | 5.69 KB   | 1.17 KB    | 27.3          | 2.9
	@ember-data/serializer/json-api                   | 3.92 KB   | 825.36 B   | 18.9          | 2.0
	@ember-data/serializer/rest                       | 3.00 KB   | 630.06 B   | 14.4          | 1.5
	@ember-data/serializer/index                      | 258.00 B  | 52.98 B    | 1.2           | 0.1
	@ember-data/serializer/transform                  | 215.00 B  | 44.15 B    | 1.0           | 0.1

Package: @ember-data/adapter
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '18.47 KB' │
│  compressed  │ '3.79 KB'  │
│ % Of Library │   '9.5'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/adapter/rest                          | 9.31 KB   | 1.91 KB    | 50.4          | 4.8
	@ember-data/adapter/-private                      | 3.80 KB   | 800.10 B   | 20.6          | 2.0
	@ember-data/adapter/error                         | 1.95 KB   | 409.50 B   | 10.5          | 1.0
	@ember-data/adapter/index                         | 1.81 KB   | 379.92 B   | 9.8           | 0.9
	@ember-data/adapter/json-api                      | 1.60 KB   | 337.21 B   | 8.7           | 0.8

Package: ember-data
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '9.24 KB' │
│  compressed  │ '1.90 KB' │
│ % Of Library │   '4.7'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-data/index                                  | 2.32 KB   | 488.56 B   | 25.1          | 1.2
	ember-data/-private                               | 1.98 KB   | 416.68 B   | 21.4          | 1.0
	ember-data/adapters/errors                        | 1.19 KB   | 249.93 B   | 12.9          | 0.6
	ember-data/setup-container                        | 503.00 B  | 103.29 B   | 5.3           | 0.3
	ember-data/relationships                          | 318.00 B  | 65.30 B    | 3.4           | 0.2
	ember-data/serializers/embedded-records-mixin     | 274.00 B  | 56.27 B    | 2.9           | 0.1
	ember-data/serializers/json-api                   | 251.00 B  | 51.54 B    | 2.7           | 0.1
	ember-data/adapters/json-api                      | 245.00 B  | 50.31 B    | 2.6           | 0.1
	ember-data/serializers/json                       | 243.00 B  | 49.90 B    | 2.6           | 0.1
	ember-data/serializers/rest                       | 243.00 B  | 49.90 B    | 2.6           | 0.1
	ember-data/transform                              | 241.00 B  | 49.49 B    | 2.5           | 0.1
	ember-data/adapters/rest                          | 237.00 B  | 48.67 B    | 2.5           | 0.1
	ember-data/serializer                             | 232.00 B  | 47.64 B    | 2.5           | 0.1
	ember-data/adapter                                | 226.00 B  | 46.41 B    | 2.4           | 0.1
	ember-data/model                                  | 222.00 B  | 45.59 B    | 2.3           | 0.1
	ember-data/store                                  | 222.00 B  | 45.59 B    | 2.3           | 0.1
	ember-data/attr                                   | 218.00 B  | 44.76 B    | 2.3           | 0.1
	ember-data/version                                | 162.00 B  | 33.26 B    | 1.7           | 0.1

Package: ember-inflector
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '8.15 KB' │
│  compressed  │ '1.67 KB' │
│ % Of Library │   '4.2'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-inflector/lib/system/inflector              | 3.11 KB   | 653.88 B   | 38.1          | 1.6
	ember-inflector/lib/helpers/pluralize             | 1.62 KB   | 340.49 B   | 19.9          | 0.8
	ember-inflector/lib/system/inflections            | 1.59 KB   | 334.13 B   | 19.5          | 0.8
	ember-inflector/index                             | 473.00 B  | 97.13 B    | 5.7           | 0.2
	ember-inflector/lib/system                        | 471.00 B  | 96.72 B    | 5.6           | 0.2
	ember-inflector/lib/system/string                 | 332.00 B  | 68.18 B    | 4.0           | 0.2
	ember-inflector/lib/utils/make-helper             | 308.00 B  | 63.25 B    | 3.7           | 0.2
	ember-inflector/lib/helpers/singularize           | 296.00 B  | 60.78 B    | 3.5           | 0.1

Package: @ember-data/debug
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '2.96 KB'  │
│  compressed  │ '622.46 B' │
│ % Of Library │   '1.5'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/debug/index                           | 2.47 KB   | 519.77 B   | 83.5          | 1.3
	@ember-data/debug/setup                           | 500.00 B  | 102.68 B   | 16.5          | 0.3

Modern Builds

🛑 The size of the library EmberData has increased by +4.63 KB (+845.0 B compressed) which exceeds the failure threshold of 75 bytes.

Warnings

⚠️ The uncompressed size of the package @ember-data/model has increased by +6.68 KB.

Changeset


EmberData +174.71 KB +4.63 KB (+38.07 KB +845.0 B compressed)
    @ember-data/store +71.91 KB -2.06 KB (+15.67 KB -375.77 B compressed)
        @ember-data/store/-private +70.99 KB -2.06 KB (+15.47 KB -375.77 B compressed)
    @ember-data/model +25.64 KB +6.68 KB (+5.59 KB +1.19 KB compressed)
        @ember-data/model/-private +25.16 KB +6.68 KB (+5.48 KB +1.19 KB compressed)

Full Asset Analysis (Modern)

Asset Size Report
=================


Library: EmberData
┌────────────┬─────────────┐
│  (index)   │   Values    │
├────────────┼─────────────┤
│   bytes    │ '174.71 KB' │
│ compressed │ '38.07 KB'  │
│  packages  │      8      │
│  modules   │     44      │
└────────────┴─────────────┘

Package: @ember-data/store
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '71.91 KB' │
│  compressed  │ '15.67 KB' │
│ % Of Library │   '41.2'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/store/-private                        | 70.99 KB  | 15.47 KB   | 98.7          | 40.6
	@ember-data/store/index                           | 936.00 B  | 203.96 B   | 1.3           | 0.5

Package: @ember-data/model
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '25.64 KB' │
│  compressed  │ '5.59 KB'  │
│ % Of Library │   '14.7'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/model/-private                        | 25.16 KB  | 5.48 KB    | 98.1          | 14.4
	@ember-data/model/index                           | 486.00 B  | 105.90 B   | 1.9           | 0.3

Package: @ember-data/record-data
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '23.20 KB' │
│  compressed  │ '5.06 KB'  │
│ % Of Library │   '13.3'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/record-data/-private                  | 23.20 KB  | 5.06 KB    | 100.0         | 13.3

Package: @ember-data/serializer
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '19.34 KB' │
│  compressed  │ '4.22 KB'  │
│ % Of Library │   '11.1'   │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/serializer/json                       | 7.12 KB   | 1.55 KB    | 36.8          | 4.1
	@ember-data/serializer/-private                   | 5.37 KB   | 1.17 KB    | 27.8          | 3.1
	@ember-data/serializer/json-api                   | 3.69 KB   | 824.14 B   | 19.1          | 2.1
	@ember-data/serializer/rest                       | 2.71 KB   | 605.35 B   | 14.0          | 1.6
	@ember-data/serializer/index                      | 243.00 B  | 52.95 B    | 1.2           | 0.1
	@ember-data/serializer/transform                  | 215.00 B  | 46.85 B    | 1.1           | 0.1

Package: @ember-data/adapter
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '16.02 KB' │
│  compressed  │ '3.49 KB'  │
│ % Of Library │   '9.2'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/adapter/rest                          | 8.37 KB   | 1.82 KB    | 52.2          | 4.8
	@ember-data/adapter/-private                      | 3.58 KB   | 799.73 B   | 22.4          | 2.1
	@ember-data/adapter/error                         | 1.91 KB   | 426.88 B   | 11.9          | 1.1
	@ember-data/adapter/index                         | 1.14 KB   | 253.64 B   | 7.1           | 0.7
	@ember-data/adapter/json-api                      | 1.02 KB   | 227.28 B   | 6.4           | 0.6

Package: ember-data
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '9.24 KB' │
│  compressed  │ '2.01 KB' │
│ % Of Library │   '5.3'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-data/index                                  | 2.32 KB   | 518.41 B   | 25.1          | 1.3
	ember-data/-private                               | 1.98 KB   | 442.14 B   | 21.4          | 1.1
	ember-data/adapters/errors                        | 1.19 KB   | 265.19 B   | 12.9          | 0.7
	ember-data/setup-container                        | 503.00 B  | 109.60 B   | 5.3           | 0.3
	ember-data/relationships                          | 318.00 B  | 69.29 B    | 3.4           | 0.2
	ember-data/serializers/embedded-records-mixin     | 274.00 B  | 59.70 B    | 2.9           | 0.2
	ember-data/serializers/json-api                   | 251.00 B  | 54.69 B    | 2.7           | 0.1
	ember-data/adapters/json-api                      | 245.00 B  | 53.38 B    | 2.6           | 0.1
	ember-data/serializers/json                       | 243.00 B  | 52.95 B    | 2.6           | 0.1
	ember-data/serializers/rest                       | 243.00 B  | 52.95 B    | 2.6           | 0.1
	ember-data/transform                              | 241.00 B  | 52.51 B    | 2.5           | 0.1
	ember-data/adapters/rest                          | 237.00 B  | 51.64 B    | 2.5           | 0.1
	ember-data/serializer                             | 232.00 B  | 50.55 B    | 2.5           | 0.1
	ember-data/adapter                                | 226.00 B  | 49.24 B    | 2.4           | 0.1
	ember-data/model                                  | 222.00 B  | 48.37 B    | 2.3           | 0.1
	ember-data/store                                  | 222.00 B  | 48.37 B    | 2.3           | 0.1
	ember-data/attr                                   | 218.00 B  | 47.50 B    | 2.3           | 0.1
	ember-data/version                                | 162.00 B  | 35.30 B    | 1.7           | 0.1

Package: ember-inflector
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '6.66 KB' │
│  compressed  │ '1.45 KB' │
│ % Of Library │   '3.8'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-inflector/lib/system/inflector              | 2.88 KB   | 642.61 B   | 43.3          | 1.6
	ember-inflector/lib/system/inflections            | 1.59 KB   | 354.54 B   | 23.9          | 0.9
	ember-inflector/index                             | 473.00 B  | 103.07 B   | 6.9           | 0.3
	ember-inflector/lib/system                        | 471.00 B  | 102.63 B   | 6.9           | 0.3
	ember-inflector/lib/helpers/pluralize             | 373.00 B  | 81.28 B    | 5.5           | 0.2
	ember-inflector/lib/system/string                 | 318.00 B  | 69.29 B    | 4.7           | 0.2
	ember-inflector/lib/utils/make-helper             | 308.00 B  | 67.11 B    | 4.5           | 0.2
	ember-inflector/lib/helpers/singularize           | 296.00 B  | 64.50 B    | 4.3           | 0.2

Package: @ember-data/debug
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '2.70 KB'  │
│  compressed  │ '602.52 B' │
│ % Of Library │   '1.5'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/debug/index                           | 2.21 KB   | 493.78 B   | 82.0          | 1.3
	@ember-data/debug/setup                           | 499.00 B  | 108.73 B   | 18.0          | 0.3

Modern Builds (No Rollup)

🛑 The size of the library EmberData has increased by +5.19 KB (+885.0 B compressed) which exceeds the failure threshold of 75 bytes.

Warnings

⚠️ The uncompressed size of the package @ember-data/model has increased by +7.44 KB.

Changeset


EmberData +214.53 KB +5.19 KB (+41.46 KB +885.0 B compressed)
    @ember-data/store +95.43 KB -2.25 KB (+18.44 KB -384.76 B compressed)
        @ember-data/store/-private/system/model/internal-model +14.23 KB -1.11 KB (+2.75 KB -188.96 B compressed)
        @ember-data/store/-private/system/ds-model-store +1.85 KB -153.0 B (+366.83 B -25.5 B compressed)
        @ember-data/store/-private/system/model/notify-changes 0.0 B -1022.0 B (0.0 B -170.3 B compressed)
    @ember-data/model +30.4 KB +7.44 KB (+5.88 KB +1.24 KB compressed)
        @ember-data/model/-private/model +9.99 KB -770.0 B (+1.93 KB -128.31 B compressed)
        @ember-data/model/-private/attr +823.0 B +18.0 B (+159.06 B +3.0 B compressed)
        @ember-data/model/-private/record-state +6.4 KB +6.4 KB (+1.24 KB +1.07 KB compressed)
        @ember-data/model/-private/tmp-cached-polyfill +1000.0 B +1000.0 B (+193.27 B +166.64 B compressed)
        @ember-data/model/-private/notify-changes +817.0 B +817.0 B (+157.9 B +136.14 B compressed)

Full Asset Analysis (Modern)

Asset Size Report
=================


Library: EmberData
┌────────────┬─────────────┐
│  (index)   │   Values    │
├────────────┼─────────────┤
│   bytes    │ '214.53 KB' │
│ compressed │ '41.46 KB'  │
│  packages  │      8      │
│  modules   │     149     │
└────────────┴─────────────┘

Package: @ember-data/store
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '95.43 KB' │
│  compressed  │ '18.44 KB' │
│ % Of Library │   '44.5'   │
└──────────────┴────────────┘
	Module                                                                             | Bytes     | Compressed | % of Package  | % Of Library
	--------------------------------------------------------------------------------------------------------------------------------------
	@ember-data/store/-private/system/core-store                                       | 17.10 KB  | 3.31 KB    | 17.9          | 8.0
	@ember-data/store/-private/system/model/internal-model                             | 14.23 KB  | 2.75 KB    | 14.9          | 6.6
	@ember-data/store/-private/system/model/states                                     | 5.42 KB   | 1.05 KB    | 5.7           | 2.5
	@ember-data/store/-private/system/fetch-manager                                    | 5.00 KB   | 989.18 B   | 5.2           | 2.3
	@ember-data/store/-private/system/store/finders                                    | 4.49 KB   | 888.09 B   | 4.7           | 2.1
	@ember-data/store/-private/system/record-array-manager                             | 4.11 KB   | 813.49 B   | 4.3           | 1.9
	@ember-data/store/-private/identifiers/cache                                       | 3.88 KB   | 767.10 B   | 4.1           | 1.8
	@ember-data/store/-private/index                                                   | 3.57 KB   | 706.41 B   | 3.7           | 1.7
	@ember-data/store/-private/system/store/record-data-store-wrapper                  | 3.36 KB   | 664.67 B   | 3.5           | 1.6
	@ember-data/store/-private/system/snapshot                                         | 3.21 KB   | 634.52 B   | 3.4           | 1.5
	@ember-data/store/-private/system/store/internal-model-factory                     | 2.91 KB   | 576.73 B   | 3.1           | 1.4
	@ember-data/store/-private/system/record-arrays/record-array                       | 2.25 KB   | 445.11 B   | 2.4           | 1.0
	@ember-data/store/-private/system/request-cache                                    | 1.89 KB   | 373.21 B   | 2.0           | 0.9
	@ember-data/store/-private/system/ds-model-store                                   | 1.85 KB   | 366.83 B   | 1.9           | 0.9
	@ember-data/store/-private/system/references/has-many                              | 1.53 KB   | 302.66 B   | 1.6           | 0.7
	@ember-data/store/-private/system/schema-definition-service                        | 1.47 KB   | 291.65 B   | 1.5           | 0.7
	@ember-data/store/-private/system/model/shim-model-class                           | 1.32 KB   | 260.72 B   | 1.4           | 0.6
	@ember-data/store/-private/system/references/belongs-to                            | 1.30 KB   | 257.82 B   | 1.4           | 0.6
	@ember-data/store/-private/system/store/serializer-response                        | 1.12 KB   | 222.45 B   | 1.2           | 0.5
	@ember-data/store/-private/identifiers/utils/uuid-v4                               | 1.05 KB   | 208.35 B   | 1.1           | 0.5
	@ember-data/store/-private/system/references/record                                | 979.00 B  | 189.21 B   | 1.0           | 0.4
	@ember-data/store/index                                                            | 936.00 B  | 180.90 B   | 1.0           | 0.4
	@ember-data/store/-private/system/references/reference                             | 917.00 B  | 177.23 B   | 0.9           | 0.4
	@ember-data/store/-private/system/record-arrays/adapter-populated-record-array     | 892.00 B  | 172.40 B   | 0.9           | 0.4
	@ember-data/store/-private/system/internal-model-map                               | 869.00 B  | 167.95 B   | 0.9           | 0.4
	@ember-data/store/-private/system/errors-utils                                     | 764.00 B  | 147.66 B   | 0.8           | 0.3
	@ember-data/store/-private/system/snapshot-record-array                            | 753.00 B  | 145.53 B   | 0.8           | 0.3
	@ember-data/store/-private/system/record-notification-manager                      | 697.00 B  | 134.71 B   | 0.7           | 0.3
	@ember-data/store/-private/system/references                                       | 598.00 B  | 115.57 B   | 0.6           | 0.3
	@ember-data/store/-private/system/promise-proxies                                  | 556.00 B  | 107.46 B   | 0.6           | 0.3
	@ember-data/store/-private/utils/construct-resource                                | 506.00 B  | 97.79 B    | 0.5           | 0.2
	@ember-data/store/-private/system/store/common                                     | 505.00 B  | 97.60 B    | 0.5           | 0.2
	@ember-data/store/-private/system/coerce-id                                        | 496.00 B  | 95.86 B    | 0.5           | 0.2
	@ember-data/store/-private/system/record-arrays                                    | 487.00 B  | 94.12 B    | 0.5           | 0.2
	@ember-data/store/-private/system/identity-map                                     | 450.00 B  | 86.97 B    | 0.5           | 0.2
	@ember-data/store/-private/ts-interfaces/identifier                                | 400.00 B  | 77.30 B    | 0.4           | 0.2
	@ember-data/store/-private/utils/symbol                                            | 393.00 B  | 75.95 B    | 0.4           | 0.2
	@ember-data/store/-private/system/record-data-for                                  | 373.00 B  | 72.09 B    | 0.4           | 0.2
	@ember-data/store/-private/identifiers/is-stable-identifier                        | 327.00 B  | 63.20 B    | 0.3           | 0.1
	@ember-data/store/-private/ts-interfaces/fetch-manager                             | 316.00 B  | 61.07 B    | 0.3           | 0.1
	@ember-data/store/-private/utils/promise-record                                    | 290.00 B  | 56.04 B    | 0.3           | 0.1
	@ember-data/store/-private/system/backburner                                       | 239.00 B  | 46.19 B    | 0.2           | 0.1
	@ember-data/store/-private/system/normalize-model-name                             | 220.00 B  | 42.52 B    | 0.2           | 0.1
	@ember-data/store/-private/utils/is-non-empty-string                               | 212.00 B  | 40.97 B    | 0.2           | 0.1
	@ember-data/store/-debug/index                                                     | 193.00 B  | 37.30 B    | 0.2           | 0.1
	@ember-data/store/-private/system/deprecated-evented                               | 190.00 B  | 36.72 B    | 0.2           | 0.1
	@ember-data/store/-private/ts-interfaces/minimum-serializer-interface              | 98.00 B   | 18.94 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data-record-wrapper                | 96.00 B   | 18.55 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/minimum-adapter-interface                 | 95.00 B   | 18.36 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data-store-wrapper                 | 95.00 B   | 18.36 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/schema-definition-service                 | 95.00 B   | 18.36 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data-json-api                      | 90.00 B   | 17.39 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/ember-data-json-api                       | 89.00 B   | 17.20 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data-schemas                       | 89.00 B   | 17.20 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/promise-proxies                           | 85.00 B   | 16.42 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-instance                           | 85.00 B   | 16.42 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/record-data                               | 81.00 B   | 15.65 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/ds-model                                  | 78.00 B   | 15.07 B    | 0.1           | 0.0
	@ember-data/store/-private/ts-interfaces/utils                                     | 75.00 B   | 14.49 B    | 0.1           | 0.0

Package: @ember-data/model
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '30.40 KB' │
│  compressed  │ '5.88 KB'  │
│ % Of Library │   '14.2'   │
└──────────────┴────────────┘
	Module                                                                | Bytes     | Compressed | % of Package  | % Of Library
	-------------------------------------------------------------------------------------------------------------------------
	@ember-data/model/-private/model                                      | 9.99 KB   | 1.93 KB    | 32.8          | 4.7
	@ember-data/model/-private/record-state                               | 6.40 KB   | 1.24 KB    | 21.1          | 3.0
	@ember-data/model/-private/system/many-array                          | 2.78 KB   | 551.02 B   | 9.2           | 1.3
	@ember-data/model/-private/errors                                     | 2.03 KB   | 402.39 B   | 6.7           | 0.9
	@ember-data/model/-private/index                                      | 1.42 KB   | 281.40 B   | 4.7           | 0.7
	@ember-data/model/-private/system/relationships/relationship-meta     | 1.25 KB   | 247.97 B   | 4.1           | 0.6
	@ember-data/model/-private/tmp-cached-polyfill                        | 1000.00 B | 193.27 B   | 3.2           | 0.5
	@ember-data/model/-private/attr                                       | 823.00 B  | 159.06 B   | 2.6           | 0.4
	@ember-data/model/-private/notify-changes                             | 817.00 B  | 157.90 B   | 2.6           | 0.4
	@ember-data/model/-private/system/promise-many-array                  | 642.00 B  | 124.08 B   | 2.1           | 0.3
	@ember-data/model/-private/belongs-to                                 | 626.00 B  | 120.98 B   | 2.0           | 0.3
	@ember-data/model/-private/has-many                                   | 587.00 B  | 113.45 B   | 1.9           | 0.3
	@ember-data/model/index                                               | 486.00 B  | 93.93 B    | 1.6           | 0.2
	@ember-data/model/-private/util                                       | 442.00 B  | 85.42 B    | 1.4           | 0.2
	@ember-data/model/-private/system/diff-array                          | 438.00 B  | 84.65 B    | 1.4           | 0.2
	@ember-data/model/-private/system/promise-belongs-to                  | 412.00 B  | 79.62 B    | 1.3           | 0.2
	@ember-data/model/-private/system/model-for-mixin                     | 408.00 B  | 78.85 B    | 1.3           | 0.2

Package: @ember-data/record-data
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '29.97 KB' │
│  compressed  │ '5.79 KB'  │
│ % Of Library │   '14.0'   │
└──────────────┴────────────┘
	Module                                                                            | Bytes     | Compressed | % of Package  | % Of Library
	-------------------------------------------------------------------------------------------------------------------------------------
	@ember-data/record-data/-private/record-data                                      | 8.16 KB   | 1.58 KB    | 27.2          | 3.8
	@ember-data/record-data/-private/graph/index                                      | 4.61 KB   | 912.44 B   | 15.4          | 2.1
	@ember-data/record-data/-private/graph/operations/replace-related-records         | 3.01 KB   | 595.28 B   | 10.0          | 1.4
	@ember-data/record-data/-private/graph/-edge-definition                           | 2.81 KB   | 555.85 B   | 9.4           | 1.3
	@ember-data/record-data/-private/relationships/state/has-many                     | 1.97 KB   | 390.22 B   | 6.6           | 0.9
	@ember-data/record-data/-private/relationships/state/belongs-to                   | 1.90 KB   | 376.30 B   | 6.3           | 0.9
	@ember-data/record-data/-private/graph/operations/update-relationship             | 1.42 KB   | 280.44 B   | 4.7           | 0.7
	@ember-data/record-data/-private/graph/-utils                                     | 1.03 KB   | 204.48 B   | 3.4           | 0.5
	@ember-data/record-data/-private/graph/operations/replace-related-record          | 979.00 B  | 189.21 B   | 3.2           | 0.4
	@ember-data/record-data/-private/index                                            | 977.00 B  | 188.82 B   | 3.2           | 0.4
	@ember-data/record-data/-private/graph/operations/add-to-related-records          | 771.00 B  | 149.01 B   | 2.5           | 0.4
	@ember-data/record-data/-private/relationships/state/implicit                     | 692.00 B  | 133.74 B   | 2.3           | 0.3
	@ember-data/record-data/-private/graph/operations/remove-from-related-records     | 650.00 B  | 125.62 B   | 2.1           | 0.3
	@ember-data/record-data/-private/coerce-id                                        | 406.00 B  | 78.46 B    | 1.3           | 0.2
	@ember-data/record-data/-private/graph/-state                                     | 293.00 B  | 56.62 B    | 1.0           | 0.1
	@ember-data/record-data/-private/normalize-link                                   | 238.00 B  | 45.99 B    | 0.8           | 0.1
	@ember-data/record-data/-private/ts-interfaces/relationship-record-data           | 100.00 B  | 19.32 B    | 0.3           | 0.0
	@ember-data/record-data/-private/graph/-operations                                | 79.00 B   | 15.26 B    | 0.3           | 0.0

Package: @ember-data/serializer
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '21.74 KB' │
│  compressed  │ '4.20 KB'  │
│ % Of Library │   '10.1'   │
└──────────────┴────────────┘
	Module                                                     | Bytes     | Compressed | % of Package  | % Of Library
	--------------------------------------------------------------------------------------------------------------
	@ember-data/serializer/json                                | 7.12 KB   | 1.38 KB    | 32.7          | 3.3
	@ember-data/serializer/-private/embedded-records-mixin     | 4.30 KB   | 850.79 B   | 19.8          | 2.0
	@ember-data/serializer/json-api                            | 3.69 KB   | 730.96 B   | 17.0          | 1.7
	@ember-data/serializer/rest                                | 2.71 KB   | 536.91 B   | 12.5          | 1.3
	@ember-data/serializer/-private/index                      | 1.18 KB   | 233.86 B   | 5.4           | 0.6
	@ember-data/serializer/-private/transforms/date            | 523.00 B  | 101.08 B   | 2.3           | 0.2
	@ember-data/serializer/-private/transforms/boolean         | 490.00 B  | 94.70 B    | 2.2           | 0.2
	@ember-data/serializer/-private/transforms/number          | 446.00 B  | 86.20 B    | 2.0           | 0.2
	@ember-data/serializer/-private/transforms/string          | 351.00 B  | 67.83 B    | 1.6           | 0.2
	@ember-data/serializer/-private/utils                      | 286.00 B  | 55.27 B    | 1.3           | 0.1
	@ember-data/serializer/index                               | 243.00 B  | 46.96 B    | 1.1           | 0.1
	@ember-data/serializer/-private/transforms/transform       | 242.00 B  | 46.77 B    | 1.1           | 0.1
	@ember-data/serializer/transform                           | 215.00 B  | 41.55 B    | 1.0           | 0.1

Package: @ember-data/adapter
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '18.14 KB' │
│  compressed  │ '3.51 KB'  │
│ % Of Library │   '8.5'    │
└──────────────┴────────────┘
	Module                                                        | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------------------
	@ember-data/adapter/rest                                      | 8.37 KB   | 1.62 KB    | 46.1          | 3.9
	@ember-data/adapter/error                                     | 1.91 KB   | 378.62 B   | 10.5          | 0.9
	@ember-data/adapter/-private/build-url-mixin                  | 1.82 KB   | 360.84 B   | 10.1          | 0.8
	@ember-data/adapter/index                                     | 1.14 KB   | 224.97 B   | 6.3           | 0.5
	@ember-data/adapter/-private/index                            | 1.03 KB   | 204.09 B   | 5.7           | 0.5
	@ember-data/adapter/json-api                                  | 1.02 KB   | 201.58 B   | 5.6           | 0.5
	@ember-data/adapter/-private/utils/serialize-query-params     | 792.00 B  | 153.07 B   | 4.3           | 0.4
	@ember-data/adapter/-private/utils/determine-body-promise     | 549.00 B  | 106.10 B   | 3.0           | 0.2
	@ember-data/adapter/-private/utils/parse-response-headers     | 480.00 B  | 92.77 B    | 2.6           | 0.2
	@ember-data/adapter/-private/utils/fetch                      | 454.00 B  | 87.74 B    | 2.4           | 0.2
	@ember-data/adapter/-private/utils/serialize-into-hash        | 347.00 B  | 67.06 B    | 1.9           | 0.2
	@ember-data/adapter/-private/utils/continue-on-reject         | 219.00 B  | 42.32 B    | 1.2           | 0.1
	@ember-data/adapter/-private/fastboot-interface               | 76.00 B   | 14.68 B    | 0.4           | 0.0

Package: ember-data
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '9.50 KB' │
│  compressed  │ '1.84 KB' │
│ % Of Library │   '4.4'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-data/index                                  | 2.32 KB   | 459.79 B   | 24.5          | 1.1
	ember-data/-private/index                         | 1.93 KB   | 381.52 B   | 20.3          | 0.9
	ember-data/adapters/errors                        | 1.19 KB   | 235.21 B   | 12.5          | 0.6
	ember-data/setup-container                        | 503.00 B  | 97.21 B    | 5.2           | 0.2
	ember-data/-private/core                          | 321.00 B  | 62.04 B    | 3.3           | 0.1
	ember-data/relationships                          | 318.00 B  | 61.46 B    | 3.3           | 0.1
	ember-data/serializers/embedded-records-mixin     | 274.00 B  | 52.95 B    | 2.8           | 0.1
	ember-data/serializers/json-api                   | 251.00 B  | 48.51 B    | 2.6           | 0.1
	ember-data/adapters/json-api                      | 245.00 B  | 47.35 B    | 2.5           | 0.1
	ember-data/serializers/json                       | 243.00 B  | 46.96 B    | 2.5           | 0.1
	ember-data/serializers/rest                       | 243.00 B  | 46.96 B    | 2.5           | 0.1
	ember-data/transform                              | 241.00 B  | 46.57 B    | 2.5           | 0.1
	ember-data/adapters/rest                          | 237.00 B  | 45.80 B    | 2.4           | 0.1
	ember-data/serializer                             | 232.00 B  | 44.83 B    | 2.4           | 0.1
	ember-data/adapter                                | 226.00 B  | 43.67 B    | 2.3           | 0.1
	ember-data/model                                  | 222.00 B  | 42.90 B    | 2.3           | 0.1
	ember-data/store                                  | 222.00 B  | 42.90 B    | 2.3           | 0.1
	ember-data/attr                                   | 218.00 B  | 42.13 B    | 2.2           | 0.1
	ember-data/version                                | 162.00 B  | 31.31 B    | 1.7           | 0.1

Package: ember-inflector
┌──────────────┬───────────┐
│   (index)    │  Values   │
├──────────────┼───────────┤
│    bytes     │ '6.66 KB' │
│  compressed  │ '1.29 KB' │
│ % Of Library │   '3.1'   │
└──────────────┴───────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	ember-inflector/lib/system/inflector              | 2.88 KB   | 569.96 B   | 43.3          | 1.3
	ember-inflector/lib/system/inflections            | 1.59 KB   | 314.45 B   | 23.9          | 0.7
	ember-inflector/index                             | 473.00 B  | 91.41 B    | 6.9           | 0.2
	ember-inflector/lib/system                        | 471.00 B  | 91.03 B    | 6.9           | 0.2
	ember-inflector/lib/helpers/pluralize             | 373.00 B  | 72.09 B    | 5.5           | 0.2
	ember-inflector/lib/system/string                 | 318.00 B  | 61.46 B    | 4.7           | 0.1
	ember-inflector/lib/utils/make-helper             | 308.00 B  | 59.52 B    | 4.5           | 0.1
	ember-inflector/lib/helpers/singularize           | 296.00 B  | 57.20 B    | 4.3           | 0.1

Package: @ember-data/debug
┌──────────────┬────────────┐
│   (index)    │   Values   │
├──────────────┼────────────┤
│    bytes     │ '2.70 KB'  │
│  compressed  │ '534.40 B' │
│ % Of Library │   '1.3'    │
└──────────────┴────────────┘
	Module                                            | Bytes     | Compressed | % of Package  | % Of Library
	-----------------------------------------------------------------------------------------------------
	@ember-data/debug/index                           | 2.21 KB   | 437.95 B   | 82.0          | 1.0
	@ember-data/debug/setup                           | 499.00 B  | 96.44 B    | 18.0          | 0.2

@github-actions
Copy link

github-actions bot commented Jul 31, 2020

Performance Report for 053aaf4

Scenario - materialization: ✅ Performance improved

✅ duration
phase estimated improvement -86ms [-108ms to -65ms] OR -3.62% [-4.54% to -2.76%]
☑️ Phase [navigationStart] => [start-find-all]
phase no difference [-2ms to 22ms]
✅ Phase [start-find-all] => [start-materialization]
phase estimated improvement -68ms [-78ms to -58ms] OR -6.61% [-7.59% to -5.66%]
✅ Phase [start-materialization] => [end-materialization]
phase estimated improvement -34ms [-43ms to -25ms] OR -4.04% [-5.07% to -3.01%]
⚠️ Phase [end-materialization] => [Test End]
phase estimated regression +5ms [2ms to 9ms] OR +6.84% [2.1% to 12.74%]

Scenario - unload: ✅ Performance improved

✅ duration
phase estimated improvement -240ms [-264ms to -218ms] OR -3.86% [-4.24% to -3.5%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-7ms to 12ms]
✅ Phase [start-push-payload] => [start-unload-records]
phase estimated improvement -142ms [-155ms to -131ms] OR -8.4% [-9.16% to -7.74%]
✅ Phase [start-unload-records] => [end-unload-records]
phase estimated improvement -104ms [-116ms to -91ms] OR -2.79% [-3.11% to -2.44%]
☑️ Phase [end-unload-records] => [Test End]
phase no difference [-1ms to 1ms]

Scenario - destroy: ⚠️ Performance regressed

⚠️ duration
phase estimated regression +162ms [129ms to 195ms] OR +4.6% [3.68% to 5.55%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-4ms to 17ms]
✅ Phase [start-push-payload] => [start-destroy-records]
phase estimated improvement -155ms [-175ms to -136ms] OR -8.95% [-10.1% to -7.86%]
⚠️ Phase [start-destroy-records] => [end-destroy-records]
phase estimated regression +316ms [307ms to 324ms] OR +33.29% [32.31% to 34.2%]
☑️ Phase [end-destroy-records] => [Test End]
phase no difference [-2ms to 2ms]

Scenario - add-children: ✅ Performance improved

✅ duration
phase estimated improvement -135ms [-152ms to -117ms] OR -7.27% [-8.19% to -6.29%]
☑️ Phase [navigationStart] => [start-push-initial-payload]
phase no difference [-16ms to 13ms]
✅ Phase [start-push-initial-payload] => [start-push-update-payload]
phase estimated improvement -97ms [-104ms to -90ms] OR -13.2% [-14.24% to -12.23%]
✅ Phase [start-push-update-payload] => [end-push-update-payload]
phase estimated improvement -20ms [-23ms to -17ms] OR -8.66% [-10.02% to -7.38%]
✅ Phase [end-push-update-payload] => [Test End]
phase estimated improvement -16ms [-19ms to -14ms] OR -11.96% [-13.78% to -10.54%]

Scenario - unused-relationships: ✅ Performance improved

✅ duration
phase estimated improvement -178ms [-193ms to -161ms] OR -6.76% [-7.36% to -6.15%]
☑️ Phase [navigationStart] => [start-push-payload]
phase no difference [-4ms to 12ms]
✅ Phase [start-push-payload] => [end-push-payload]
phase estimated improvement -162ms [-175ms to -148ms] OR -9.41% [-10.14% to -8.57%]
✅ Phase [end-push-payload] => [Test End]
phase estimated improvement -21ms [-24ms to -19ms] OR -13.84% [-15.21% to -12.56%]

@runspired
Copy link
Contributor

@snewcomer snewcomer force-pushed the sn/destroy-record-unload-2 branch 4 times, most recently from 20c4aad to 73583ec Compare April 24, 2021 16:31
@jrjohnson
Copy link
Contributor

We addressed the first failure in Ilios-frontend and merged that today, we were relying on the buggy destroyed record not unloading behavior.

The other test failure seems to be a change in the way isNew is set or tracked. We have a getter that filters out isNew models. Once terms were persisted this getter would re-fire and the newly added term wouldn't be isNew anymore. Now the getter doesn't fire again after isNew gets set to false (or something else is happening I'm not seeing).

I'm not sure why we're looking at isNew here, I'm guessing it is cruft from older async patterns on our end and I'll probably just remove it, but I wanted to mention it here in case this is a bug in this change.

@runspired
Copy link
Contributor

@jrjohnson I'd love to investigate that with you before you remove it, we may need to fix a notify somewhere.

Copy link
Contributor

@runspired runspired left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall approved but we need to fix M3 (involves just going back to setting currentState on the model in the FF off branch) / potential issue with ilios (potential lack of notification on isNew)

@snewcomer snewcomer force-pushed the sn/destroy-record-unload-2 branch 2 times, most recently from d417dcd to 2bfded0 Compare May 5, 2021 04:07
@runspired runspired force-pushed the sn/destroy-record-unload-2 branch from db37402 to e0614a9 Compare May 7, 2021 22:35
@runspired runspired requested a review from igorT May 8, 2021 07:32
@igorT
Copy link
Member

igorT commented May 11, 2021

Things left to do:
Back out the hasDirtyAttributes change
Refactor invalid errors handling
Update PR description/commit message
Get CI passing

@igorT
Copy link
Member

igorT commented May 11, 2021 via email

@runspired runspired added 🏷️ bug This PR primarily fixes a reported issue 🏷️ feat This PR introduces a new feature 🎯 beta PR should be backported to beta labels May 12, 2021
@runspired runspired merged commit cf71018 into master May 12, 2021
@delete-merged-branch delete-merged-branch bot deleted the sn/destroy-record-unload-2 branch May 12, 2021 05:17
@runspired runspired removed the 🎯 beta PR should be backported to beta label May 27, 2021
@runspired runspired removed the Bug label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bug This PR primarily fixes a reported issue 🏷️ feat This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DS.Model.destroyRecord does not unload record from store
4 participants