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

User menu takes a long time to open/close #23

Open
david-crespo opened this issue Aug 16, 2023 · 6 comments
Open

User menu takes a long time to open/close #23

david-crespo opened this issue Aug 16, 2023 · 6 comments

Comments

@david-crespo
Copy link
Contributor

david-crespo commented Aug 16, 2023

Weird one. Can repro locally. Seems like it's only on the homepage, which points to something about the cost of re-rendering the whole page? (which shouldn't be happening)

Update: it's not rendering the page, but it may still have something to do with the size of the page, maybe the cost of applying background opacity when the dropdown appears. When I type something in the filter box and make the list a lot shorter, the delay disappears.

https://twitter.com/shadcn/status/1672620192663478273

@benjaminleonard
Copy link
Collaborator

Wonder if this is related to the bug Eugene had where the select was taking a long time to open? Both radix

@david-crespo
Copy link
Contributor Author

Well, I turned off all the CSS and it's instantaneous. So that's a pretty strong hint.

@david-crespo
Copy link
Contributor Author

david-crespo commented Aug 16, 2023

A couple more details:

  • Much faster in Chrome
  • Commenting out this line in particular improves the delay by maybe 80% but doesn't eliminate it

https://github.com/oxidecomputer/rfd-site/blob/3688a8caae57b72accb3deac17737b65d4723344/app/styles/index.css#L2

  • It doesn't have to do with the height of the index page alone, because replacing the RFD rows with empty boxes of the same height fixes the problem

@david-crespo
Copy link
Contributor Author

david-crespo commented Aug 16, 2023

Ok. I'm like 80% sure it's that P3 colors are just slow, possibly when doing anything, possibly only when combined with some kind of opacity filter.

@benjaminleonard
Copy link
Collaborator

benjaminleonard commented Aug 17, 2023

Well there shouldn't be any opacity being applied whilst the dropdown is open. It doesn't seem too bad for me (especially with modal={false}) but still somewhat slow.

Possibly related: radix-ui/primitives#1634

@david-crespo
Copy link
Contributor Author

Yeah, after commenting out nearly all the P3 color styling and still seeing the issue, I don't suspect the colors. It seems like it's just the full reflow with a bunch of divs in there taking a while.

@benjaminleonard benjaminleonard transferred this issue from another repository Mar 11, 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

No branches or pull requests

2 participants