Skip to content

perf: reduce DBSearchPage and DBChartExplorerPage rerenders from typing in search input #924

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

knudtty
Copy link
Contributor

@knudtty knudtty commented Jun 11, 2025

Fixes HDX-1771

DBSearchPage rerender time for a keypress in the search input went from 46ms -> 4ms
Pasted Graphic 1
Pasted Graphic 4

Copy link

vercel bot commented Jun 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyperdx-v2-oss-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2025 1:27pm

Comment on lines +968 to +979
const aliasWith = useMemo(
() =>
Object.entries(aliasMap ?? {}).map(([key, value]) => ({
name: key,
sql: {
sql: value,
params: {},
},
isSubquery: false,
})),
[aliasMap],
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a major culprit, because histogramTimeChartConfig relies on it and was the main cause of an expensive rerender of DBTimeChart every keypress.

Copy link

changeset-bot bot commented Jun 11, 2025

🦋 Changeset detected

Latest commit: 2036957

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

This PR includes changesets to release 2 packages
Name Type
@hyperdx/app Patch
@hyperdx/api 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

@knudtty knudtty changed the title perf: reduce DBSearchPage and DBChartExplorerPage rerenders from typing perf: reduce DBSearchPage and DBChartExplorerPage rerenders from typing in search input Jun 11, 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