Skip to content

[Dialog] Improve performance#2855

Open
andresz1 wants to merge 3 commits intoradix-ui:mainfrom
andresz1:main
Open

[Dialog] Improve performance#2855
andresz1 wants to merge 3 commits intoradix-ui:mainfrom
andresz1:main

Conversation

@andresz1
Copy link

@andresz1 andresz1 commented Apr 19, 2024

Description

This PR improves Dialog component INP performance by prioritising paint when modal prop is set to true

  • The style change over the body is now executed using a setTimeout to avoid doing synchronously before the paint.

Before

Screenshot 2024-04-19 at 12 03 15

After

Screenshot 2024-04-19 at 11 59 43

@andresz1 andresz1 changed the title Improve dialog performance [Dialog] Improve performance Apr 19, 2024
Copy link

@nucliweb nucliweb left a comment

Choose a reason for hiding this comment

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

🚀

@RinNguyens
Copy link

👍

@kurtextrem
Copy link

@chaance Could you please merge this? This can have meaningful impact on INP.

@oriolpuig
Copy link

Recently, my INP was degraded by the same reason that this PR tries to fix. It would be nice if we could merge it! 🙏🏻

Thank you @andresz1! 👏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Resolution: Needs Investigation This issue needs more investigation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants