Skip to content

fix(searchbar): reduce runtime to On when generating search items from tags - #47629

Merged
JonasBa merged 1 commit into
masterfrom
jb/fix/searchbar-complexity
Apr 20, 2023
Merged

fix(searchbar): reduce runtime to On when generating search items from tags#47629
JonasBa merged 1 commit into
masterfrom
jb/fix/searchbar-complexity

Conversation

@JonasBa

Copy link
Copy Markdown
Contributor

This came up from some eslint rule testing so I figured I'd fix it as the searchbar is somewhat of a vital piece of software at Sentry and this looks like a hot path?

Initial shallow copy is unnecessary and return [...groups, item] from each iteration causes On^2 runtime

@JonasBa
JonasBa requested a review from vuluongj20April 19, 2023 13:57
@JonasBa
JonasBa requested a review from a team as a code ownerApril 19, 2023 13:57
@github-actionsgithub-actionsBot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 19, 2023
@JonasBa
JonasBa merged commit 94b4415 into masterApr 20, 2023
@JonasBa
JonasBa deleted the jb/fix/searchbar-complexity branch April 20, 2023 18:00
@JonasBaJonasBa mentioned this pull request Apr 27, 2023
@github-actionsgithub-actionsBot locked and limited conversation to collaborators May 6, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: FrontendAutomatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@JonasBa@vuluongj20