square / maker

Maker Design System by Square
https://square.github.io/maker/styleguide/latest-stable/
Other
63 stars 14 forks source link

detectAlignCenter in the Text component has performance issues #577

Closed rgershon closed 2 months ago

rgershon commented 8 months ago

Bug description

The detectAlignCenter function is responsible for a large amount of blocking time due to style re-calculation. https://github.com/square/maker/blob/master/src/components/Text/src/Text.vue#L219

See the image where this affects 2560 elements. image

Reproduction

Visit any production site, preferably with a larger catalog and it will appear in the performance tab.

Environment

Production

Addressed by

No response

Can you contribute a fix?

github-actions[bot] commented 2 months ago

This issue has been automatically closed because it hasn't received any activity in over 6 months.