Skip to content

feat(ui): Flatten discover/eap/span responses #93478

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

Merged
merged 6 commits into from
Jun 16, 2025

Conversation

scttcper
Copy link
Member

@scttcper scttcper commented Jun 12, 2025

Flattens the types into a single object with 2300 key/values which is still big, but slightly simpler since it isn't an intersection of all the objects with their keys. Reduces the number of instantiations by 100k.

before
image

after
image

Flattens the types into a single type with 900 key/values which is still big, but slightly simpler since it isn't an intersection of all the types.
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 12, 2025
@scttcper scttcper marked this pull request as ready for review June 12, 2025 21:49
@scttcper scttcper requested a review from a team as a code owner June 12, 2025 21:49
Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Makes sense, just two nits! Thanks 🙏🏻

Copy link
Member

Choose a reason for hiding this comment

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

So many things can be flattened! Maybe this would be good in a utils/types/flatten.ts file, to clarify what it's for? No strong opinion on file extension

@scttcper scttcper merged commit e02b7e0 into master Jun 16, 2025
45 checks passed
@scttcper scttcper deleted the scttcper/flatten-discover-responses branch June 16, 2025 17:53
billyvg pushed a commit that referenced this pull request Jun 18, 2025
Flattens the types into a single object with 2300 key/values which is
still big, but slightly simpler since it isn't an intersection of all
the objects with their keys. Reduces the number of instantiations by
100k.

before

![image](https://github.com/user-attachments/assets/c7f524f0-6759-49a2-b971-3f9b3b2e3e3e)


after

![image](https://github.com/user-attachments/assets/34794438-30f7-4f10-bf9d-9b11247901ec)
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
Flattens the types into a single object with 2300 key/values which is
still big, but slightly simpler since it isn't an intersection of all
the objects with their keys. Reduces the number of instantiations by
100k.

before

![image](https://github.com/user-attachments/assets/c7f524f0-6759-49a2-b971-3f9b3b2e3e3e)


after

![image](https://github.com/user-attachments/assets/34794438-30f7-4f10-bf9d-9b11247901ec)
@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants