enhance: ImmutableJS always denormalizes to normal JS#3421
Merged
Conversation
🦋 Changeset detectedLatest commit: 546443d The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Size Change: -7 B (-0.01%) Total Size: 76.8 kB ℹ️ View Unchanged
|
Contributor
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: 546443d | Previous: 397c113 | Ratio |
|---|---|---|---|
normalizeLong |
540 ops/sec (±0.22%) |
540 ops/sec (±0.46%) |
1 |
infer All |
9094 ops/sec (±1.12%) |
8900 ops/sec (±1.43%) |
0.98 |
denormalizeLong |
273 ops/sec (±3.42%) |
248 ops/sec (±3.49%) |
0.91 |
denormalizeLong donotcache |
966 ops/sec (±0.31%) |
893 ops/sec (±0.37%) |
0.92 |
denormalizeShort donotcache 500x |
1410 ops/sec (±0.20%) |
1403 ops/sec (±0.26%) |
1.00 |
denormalizeShort 500x |
785 ops/sec (±2.26%) |
770 ops/sec (±2.14%) |
0.98 |
denormalizeShort 500x withCache |
5182 ops/sec (±0.27%) |
5522 ops/sec (±0.26%) |
1.07 |
denormalizeLong with mixin Entity |
264 ops/sec (±1.93%) |
245 ops/sec (±2.22%) |
0.93 |
denormalizeLong withCache |
6963 ops/sec (±0.32%) |
6776 ops/sec (±0.19%) |
0.97 |
denormalizeLong All withCache |
7643 ops/sec (±0.27%) |
8278 ops/sec (±0.22%) |
1.08 |
denormalizeLong Query-sorted withCache |
7323 ops/sec (±0.68%) |
7744 ops/sec (±1.28%) |
1.06 |
denormalizeLongAndShort withEntityCacheOnly |
1754 ops/sec (±0.29%) |
1692 ops/sec (±0.39%) |
0.96 |
getResponse |
7676 ops/sec (±1.14%) |
7172 ops/sec (±1.15%) |
0.93 |
getResponse (null) |
4710107 ops/sec (±0.46%) |
4953127 ops/sec (±0.42%) |
1.05 |
getResponse (clear cache) |
269 ops/sec (±1.83%) |
250 ops/sec (±2.25%) |
0.93 |
getSmallResponse |
2717 ops/sec (±0.07%) |
2815 ops/sec (±0.23%) |
1.04 |
getSmallInferredResponse |
2006 ops/sec (±0.31%) |
2047 ops/sec (±0.28%) |
1.02 |
getResponse Query-sorted |
7857 ops/sec (±0.41%) |
7300 ops/sec (±0.48%) |
0.93 |
getResponse Collection |
6617 ops/sec (±1.09%) |
6492 ops/sec (±1.00%) |
0.98 |
get Collection |
5781 ops/sec (±0.47%) |
5712 ops/sec (±0.24%) |
0.99 |
setLong |
535 ops/sec (±0.34%) |
541 ops/sec (±0.31%) |
1.01 |
setLongWithMerge |
234 ops/sec (±0.35%) |
230 ops/sec (±0.39%) |
0.98 |
setLongWithSimpleMerge |
250 ops/sec (±0.30%) |
246 ops/sec (±0.25%) |
0.98 |
setSmallResponse 500x |
927 ops/sec (±0.47%) |
915 ops/sec (±0.29%) |
0.99 |
This comment was automatically generated by workflow using github-action-benchmark.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3421 +/- ##
=======================================
Coverage 98.74% 98.74%
=======================================
Files 136 136
Lines 2396 2399 +3
Branches 490 489 -1
=======================================
+ Hits 2366 2369 +3
Misses 16 16
Partials 14 14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
022c491 to
19580c4
Compare
87eadd1 to
6360342
Compare
6360342 to
546443d
Compare
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: Denormalize always transforms immutablejs entities into the class
Previously using ImmutableJS structures when calling denormalize() would maintain
nested schemas as immutablejs structures still. Now everything is converted to normal JS.
This is how the types have always been specified.
Motivation
Think through use of immutablejs. Maximize performance and compatibility.
Solution
Don't check objects are immutable everywhere.
Next Work
ideal case:
also support immutablejs at entity level
then we can remove all immutable checks beyond getEntity