Skip to content

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 19, 2025 0:36am

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: faf0877

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
Copy link
Contributor

@teeohhem teeohhem left a comment

Choose a reason for hiding this comment

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

Good stuff. Tested on vercel with no issues seen

@knudtty knudtty merged commit d1f4184 into main Jun 20, 2025
7 checks passed
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