Skip to content

Conversation

@uwemaurer
Copy link
Contributor

This serializableCheck is not needed since this data is loaded via JSON request and therefore always serializable.

This change makes the UI a lot snappier and
removes these warnings:

SerializableStateInvariantMiddleware took 1590ms, which is more than the warning threshold of 32ms.

This serializableCheck is not needed since this data is loaded via JSON request
and therefore always serializable.

This change makes the UI a lot snappier and
removes these warnings:

`SerializableStateInvariantMiddleware took 1590ms, which is more than the warning threshold of 32ms. `
Copilot AI review requested due to automatic review settings December 10, 2025 11:10
@vercel
Copy link

vercel bot commented Dec 10, 2025

@uwemaurer is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes Redux middleware configuration by skipping serializable state checks for RTK Query cache slices (backend, github, gitlab). Since RTK Query data originates from JSON API responses, it is inherently serializable, making the check redundant and expensive. This change addresses performance warnings where SerializableStateInvariantMiddleware was taking over 1590ms (far exceeding the 32ms threshold), resulting in a noticeably snappier UI.

  • Adds ignoredPaths configuration to skip serializable checks for RTK Query slices
  • Improves UI responsiveness by eliminating expensive middleware checks
  • Adds explanatory comment documenting why these paths are safe to ignore

@krlvi
Copy link
Member

krlvi commented Dec 10, 2025

SerializableStateInvariantMiddleware took 1590ms

Oh interesting! Nice catch. There is some lint error but other than that looks good to go!

@krlvi krlvi merged commit 64d5569 into gitbutlerapp:master Dec 11, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants