Skip to content

Optimize dev check middleware performance #943

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

Merged
merged 7 commits into from
Mar 26, 2021

Conversation

markerikson
Copy link
Collaborator

@markerikson markerikson commented Mar 26, 2021

This PR:

  • Optimizes the immutability middleware by:
    • assuming that frozen objects are immutable, which lets us bail out immediately in most cases with Immer
    • replacing array keypaths with strings
    • Tweaking a couple loops
  • Optimizes the serializability middleware by:
    • replacing array keypaths with strings
  • Adds a new ignoreState option to the serializability middleware that skips checking state entirely

Fixes #885 and fixes #926 .

@netlify
Copy link

netlify bot commented Mar 26, 2021

Deploy preview for redux-starter-kit-docs ready!

Built with commit 89608b8

https://deploy-preview-943--redux-starter-kit-docs.netlify.app

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bffdf98:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration

@github-actions
Copy link

Size Change: +246 B (0%)

Total Size: 69.8 kB

Filename Size Change
dist/redux-toolkit.cjs.development.js 13.9 kB +63 B (0%)
dist/redux-toolkit.cjs.production.min.js 5.29 kB +17 B (0%)
dist/redux-toolkit.esm.js 13.8 kB +64 B (0%)
dist/redux-toolkit.umd.js 25.7 kB +84 B (0%)
dist/redux-toolkit.umd.min.js 11 kB +18 B (0%)
ℹ️ View Unchanged
Filename Size Change
dist/index.js 149 B 0 B

compressed-size-action

@netlify
Copy link

netlify bot commented Mar 26, 2021

Deploy preview for redux-starter-kit-docs ready!

Built with commit bffdf98

https://deploy-preview-943--redux-starter-kit-docs.netlify.app

@markerikson markerikson merged commit 3191483 into master Mar 26, 2021
@markerikson markerikson deleted the feature/dev-middleware-perf branch March 26, 2021 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant