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

enhance: Entity runs validate after marking circular reference point #3133

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

ntucker
Copy link
Collaborator

@ntucker ntucker commented Jun 23, 2024

Motivation

Group like code for easier to read and possibly refactoring.

Solution

Validate after marking cirucular reference loops

This should not change any behavior as validate should be deterministic so if it fails
it will fail again and failure measure throwing which exits the whole stack.
This improves code grouping. (And possibly cache locality improvement - though didn't check.)

Copy link

changeset-bot bot commented Jun 23, 2024

🦋 Changeset detected

Latest commit: 938de19

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@data-client/endpoint Patch
example-benchmark Patch
normalizr-github-example Patch
normalizr-redux-example Patch
normalizr-relationships Patch

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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 938de19 Previous: 35b4e7f Ratio
normalizeLong 447 ops/sec (±1.79%) 420 ops/sec (±2.21%) 0.94
infer All 9925 ops/sec (±0.46%) 9516 ops/sec (±0.76%) 0.96
denormalizeLong 349 ops/sec (±0.84%) 323 ops/sec (±1.88%) 0.93
denormalizeLong donotcache 901 ops/sec (±0.30%) 838 ops/sec (±1.68%) 0.93
denormalizeShort donotcache 500x 1346 ops/sec (±0.25%) 1346 ops/sec (±0.67%) 1
denormalizeShort 500x 988 ops/sec (±0.24%) 939 ops/sec (±0.90%) 0.95
denormalizeShort 500x withCache 5035 ops/sec (±0.31%) 4916 ops/sec (±0.33%) 0.98
denormalizeLong with mixin Entity 305 ops/sec (±0.67%) 281 ops/sec (±1.25%) 0.92
denormalizeLong withCache 6445 ops/sec (±0.14%) 6775 ops/sec (±0.31%) 1.05
denormalizeLong All withCache 6443 ops/sec (±0.13%) 6837 ops/sec (±0.33%) 1.06
denormalizeLong Query-sorted withCache 6210 ops/sec (±0.80%) 6791 ops/sec (±0.44%) 1.09
denormalizeLongAndShort withEntityCacheOnly 1526 ops/sec (±0.56%) 1446 ops/sec (±0.75%) 0.95
getResponse 5631 ops/sec (±1.46%) 5878 ops/sec (±0.96%) 1.04
getResponse (null) 6090132 ops/sec (±0.75%) 5852784 ops/sec (±0.76%) 0.96
getResponse (clear cache) 298 ops/sec (±0.19%) 280 ops/sec (±1.00%) 0.94
getSmallResponse 2714 ops/sec (±0.23%) 2617 ops/sec (±0.19%) 0.96
getSmallInferredResponse 2002 ops/sec (±0.19%) 1995 ops/sec (±0.30%) 1.00
getResponse Query-sorted 5353 ops/sec (±0.63%) 5582 ops/sec (±0.46%) 1.04
getResponse Collection 6397 ops/sec (±1.26%) 6587 ops/sec (±1.19%) 1.03
get Collection 5272 ops/sec (±1.03%) 5385 ops/sec (±1.09%) 1.02
setLong 452 ops/sec (±1.94%) 414 ops/sec (±2.50%) 0.92
setLongWithMerge 189 ops/sec (±1.53%) 174 ops/sec (±1.77%) 0.92
setLongWithSimpleMerge 199 ops/sec (±1.44%) 181 ops/sec (±1.99%) 0.91
setSmallResponse 500x 869 ops/sec (±1.37%) 834 ops/sec (±1.57%) 0.96

This comment was automatically generated by workflow using github-action-benchmark.

Copy link

codecov bot commented Jun 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (2c19204) to head (938de19).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3133   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         127      127           
  Lines        2243     2243           
  Branches      455      455           
=======================================
  Hits         2216     2216           
  Misses         16       16           
  Partials       11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ntucker ntucker merged commit 7bd322d into master Jun 23, 2024
25 checks passed
@ntucker ntucker deleted the circular-validate-reorder branch June 23, 2024 11:54
@github-actions github-actions bot mentioned this pull request Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant