This repository was archived by the owner on Sep 5, 2024. It is now read-only.
InkRippleService causes poor performance for clickable list items #4199
Labels
severity: performance
This issue causes a significant performance degradation
type: performance
This issue is related to performance
ui: ink
Milestone
I recently spent some time debugging a performance problem with a list of clickable items (

mdListItem
with siblingngClick
directive). Using the Chrome Timeline tool I saw that nearly all of the delay was spent "recalculating style" (the purple boxes):Drilling down further I noticed that every one of these style calculations was reported as "forced" by Chrome, and attributed to the InkRippleService's use of window.getComputedStyle:
Apparently the presence of
ng-click
causes the list items to use the ink rippled effect (see issue #904) which then results in this forced style calculation. Could this calculation not be deferred until the item was actually clicked (aka when the ripple effect was actually required)?FYI removing the
ng-click
attribute from mymd-list-item
reduced the event handler execution time from 180ms to 54ms.The text was updated successfully, but these errors were encountered: