primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Ripple: Performance Degradation in Chrome 135 and Edge 135

Open palkema opened this issue 7 months ago • 12 comments

I have several applications that are experiencing significant performance degradation in both chrome 135 and edge version 135.

As you can see in the screenshot below, it seems that the majority of the performance issues are related to the recalculate styles event, specially the getHeight() function.

Image

I have seen this on three applications now, all which use prime react. It seems to impact datatables, and dropdowns specifically, but may impact other components as well.

System Information

primereact: 10.1.1
react: 18.2.0

Steps to reproduce the behavior

  1. Upgrade edge or chrome to version starting in 135, we observe performance slowness on rerenders, especially with datatables and drop downs.
  2. Downgrade back to chrome or edge 134, and these issues go away.

Expected behavior

My expectation would be no performance degredation between edge and chrome version updates.

palkema avatar Apr 24 '25 14:04 palkema

Just wanted to add more screenshots. This is a screenshot from a different application than was was sent previously that also uses prime react.

Image

If you look at the full stack, it seems to be calling getDimensions, which calls getHeight.

Image

palkema avatar Apr 24 '25 15:04 palkema

Excellent debugging. Sounds like something with Chrome changed making this call more expensive.

melloware avatar Apr 24 '25 17:04 melloware

@palkema can you provide a simple StackBlitz reproducer showing the issue?

melloware avatar Apr 26 '25 11:04 melloware

@acc-cassio have you seen this he mentions its with DataTable pre your updates in 10.9.5?

melloware avatar Apr 26 '25 11:04 melloware

@melloware Yeah, in the screenshot you can see version 10.9.4 of primereact, even if in the post it is stated 10.1.1. In any case, it precedes the updates of 10.9.5 indeed, or what do you mean?

I cannot reproduce the problem on my end, I am using Chrome Version 135.0.7049.96 (Official Build) (x86_64) and using a Datatable with a lot of data. Also, I could not find any use of the getHeight and getDimensions functions in the primereact library.

acc-cassio avatar Apr 26 '25 12:04 acc-cassio

I also could not reproduce in Chrome 135. Thanks for checking @acc-cassio . @

melloware avatar Apr 26 '25 12:04 melloware

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

github-actions[bot] avatar Apr 26 '25 12:04 github-actions[bot]

We were able to resolve this by updating our config.ts and disabling ripple for chrome / edge versions greater than 134.

PrimeReact.ripple = Number(window.clientInformation.userAgent.split('Chrome/')[1].split('.')[0]) <= 134;

Doing this resolved our issue.

palkema avatar May 07 '25 13:05 palkema

wow so the Ripple is causing the performance issues?

melloware avatar May 07 '25 13:05 melloware

Yes. For us, it was 100% Ripple. When we disabled this, all of our performance issues went away. This impacted both Edge 135+ and Chrome 135+ and most apps we tested were impacted in some way.

Some apps were minimally impacted, while others were essentially unusable depending on the components that were used.

palkema avatar May 07 '25 15:05 palkema

Awesome I updated the title to say "Ripple" so we can see exactly what is causing this bug.

melloware avatar May 07 '25 15:05 melloware

Yep it looks like Ripple definitely does dimension calculation...

melloware avatar May 07 '25 23:05 melloware