Skip to content

Conversation

ntucker
Copy link
Collaborator

@ntucker ntucker commented Mar 1, 2025

BREAKING CHANGE: NetworkManager.fetched, NetworkManager.rejectors, NetworkManager.resolvers, NetworkManager.fetchedAt
-> NetworkManager.fetching

Motivation

Better performance, security, and readability

Solution

fetching: Map<string, FetchMeta>;
interface FetchingMeta {
  promise: Promise<any>;
  resolve: (value?: any) => void;
  reject: (value?: any) => void;
  fetchedAt: number;
}

Before

if (action.key in this.fetched)

After

if (this.fetching.has(action.key))

Copy link

changeset-bot bot commented Mar 1, 2025

🦋 Changeset detected

Latest commit: eaef2ca

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

This PR includes changesets to release 7 packages
Name Type
@data-client/core Major
@data-client/test Major
@data-client/react Major
example-benchmark Patch
@data-client/img Major
test-bundlesize Patch
coinbase-lite 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 bot commented Mar 1, 2025

Size Change: +8 B (+0.01%)

Total Size: 77.8 kB

Filename Size Change
examples/test-bundlesize/dist/rdcClient.js 10.2 kB +8 B (+0.08%)
ℹ️ View Unchanged
Filename Size
examples/test-bundlesize/dist/App.js 3.42 kB
examples/test-bundlesize/dist/polyfill.js 311 B
examples/test-bundlesize/dist/rdcEndpoint.js 5.65 kB
examples/test-bundlesize/dist/react.js 57.5 kB
examples/test-bundlesize/dist/webpack-runtime.js 726 B

compressed-size-action

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: eaef2ca Previous: 25b153a Ratio
normalizeLong 498 ops/sec (±0.38%) 497 ops/sec (±0.62%) 1.00
infer All 9264 ops/sec (±1.24%) 8961 ops/sec (±1.54%) 0.97
denormalizeLong 273 ops/sec (±3.14%) 276 ops/sec (±2.59%) 1.01
denormalizeLong donotcache 989 ops/sec (±0.31%) 994 ops/sec (±0.42%) 1.01
denormalizeShort donotcache 500x 1408 ops/sec (±0.30%) 1391 ops/sec (±0.35%) 0.99
denormalizeShort 500x 775 ops/sec (±2.33%) 766 ops/sec (±2.11%) 0.99
denormalizeShort 500x withCache 5100 ops/sec (±0.14%) 5313 ops/sec (±0.31%) 1.04
queryShort 500x withCache 2430 ops/sec (±0.34%) 2436 ops/sec (±0.47%) 1.00
denormalizeLong with mixin Entity 260 ops/sec (±2.00%) 256 ops/sec (±2.18%) 0.98
denormalizeLong withCache 6705 ops/sec (±0.17%) 6897 ops/sec (±0.36%) 1.03
denormalizeLong All withCache 8182 ops/sec (±0.27%) 7331 ops/sec (±0.19%) 0.90
denormalizeLong Query-sorted withCache 7360 ops/sec (±1.71%) 6867 ops/sec (±1.04%) 0.93
denormalizeLongAndShort withEntityCacheOnly 1700 ops/sec (±0.36%) 1688 ops/sec (±0.40%) 0.99
getResponse 6066 ops/sec (±1.06%) 6323 ops/sec (±1.30%) 1.04
getResponse (null) 5727001 ops/sec (±0.70%) 5163782 ops/sec (±0.63%) 0.90
getResponse (clear cache) 261 ops/sec (±1.81%) 259 ops/sec (±1.94%) 0.99
getSmallResponse 2484 ops/sec (±0.28%) 2607 ops/sec (±0.18%) 1.05
getSmallInferredResponse 2078 ops/sec (±0.31%) 2066 ops/sec (±0.27%) 0.99
getResponse Collection 6307 ops/sec (±0.95%) 6595 ops/sec (±1.07%) 1.05
get Collection 5827 ops/sec (±0.45%) 5604 ops/sec (±0.44%) 0.96
get Query-sorted 6567 ops/sec (±0.52%) 7219 ops/sec (±0.37%) 1.10
setLong 490 ops/sec (±0.63%) 508 ops/sec (±0.41%) 1.04
setLongWithMerge 222 ops/sec (±0.34%) 224 ops/sec (±0.38%) 1.01
setLongWithSimpleMerge 233 ops/sec (±0.41%) 239 ops/sec (±0.52%) 1.03
setSmallResponse 500x 912 ops/sec (±0.31%) 908 ops/sec (±0.33%) 1.00

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

Copy link

codecov bot commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.74%. Comparing base (25b153a) to head (eaef2ca).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3394   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         125      125           
  Lines        2238     2238           
  Branches      458      459    +1     
=======================================
  Hits         2210     2210           
  Misses         13       13           
  Partials       15       15           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ntucker ntucker force-pushed the master branch 2 times, most recently from 3cb6174 to d085b5e Compare March 10, 2025 10:27
@ntucker ntucker marked this pull request as ready for review April 7, 2025 22:15
@ntucker ntucker force-pushed the nm-internal branch 2 times, most recently from fcb55b9 to ac19ecf Compare April 7, 2025 22:36
@ntucker ntucker merged commit d44d36a into master Apr 7, 2025
17 of 22 checks passed
@ntucker ntucker deleted the nm-internal branch April 7, 2025 22:44
@github-actions github-actions bot mentioned this pull request Apr 7, 2025
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.

1 participant