-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: move defaultValue into RecordData to better encapsulate and prevent eager instantiations #8117
Conversation
…ent eager instantiations
Asset Size Report for 1e2de29 Modern Builds ✅ EmberData shrank by -53.0 B (-78.0 B compressed)WarningsChangeset
Full Asset Analysis (Modern)
Modern Builds (No Rollup) ☑️ EmberData has not changed in sizeIf any packages had changed sizes they would be listed here. Changeset
Full Asset Analysis (Modern)
|
Performance Report for 1e2de29 Scenario - materialization: ☑️ Performance is stable
Scenario - unload: ☑️ Performance is stable
Scenario - destroy: ✅ Performance improved
Scenario - add-children: ☑️ Performance is stable
Scenario - unused-relationships: ☑️ Performance is stable
|
This prevents needing to instantiate and iterate the record to retrieve default values. We may end up needing to deprecate record-access, but the hope is that folks generally weren't using the undocumented arguments passed to defaultValue.
Additionally, this lets us remove the un-spec'd
hasAttr
from V1 cache which was necessary to distinguish betweenundefined
meaning never-set andundefined
meaning set to undefined for default-value determination.