maker icon indicating copy to clipboard operation
maker copied to clipboard

detectAlignCenter in the Text component has performance issues

Open rgershon opened this issue 2 years ago • 0 comments

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?

  • [ ] I’m interested in opening a pull request for this issue.

rgershon avatar Feb 02 '24 21:02 rgershon