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

ft: do not traverse whole state for actions handling #377

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

hauleth
Copy link
Contributor

@hauleth hauleth commented Jul 2, 2024

What kind of change does this PR introduce?

Performance fix

What is the current behavior?

We traverse whole state each time we want to compute whether we want to enable
any timeouts. It causes measurable performance hit. As it is map and we know
only that there is only limited set of keys that can affect timeouts it is
better to access it directly.

What is the new behavior?

Access only required fields. It also makes that function performance less
dependant on state size.

@hauleth hauleth force-pushed the ft/actions-handling-traverse branch from 292e67f to bd889ef Compare July 2, 2024 10:31
@hauleth hauleth changed the base branch from main to v2 July 2, 2024 10:32
@hauleth hauleth marked this pull request as ready for review July 2, 2024 10:32
@hauleth hauleth requested a review from a team as a code owner July 2, 2024 10:32
@hauleth hauleth force-pushed the ft/actions-handling-traverse branch from bd889ef to c5c99b7 Compare July 2, 2024 10:44
@abc3 abc3 merged commit a6b4a0f into supabase:v2 Jul 2, 2024
5 checks passed
@hauleth hauleth deleted the ft/actions-handling-traverse branch July 2, 2024 12:01
@hauleth hauleth mentioned this pull request Aug 22, 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.

2 participants