LinesEllipsis-canvas & LinesEllipsis-unit adds dom nodes.
nimishsinghal opened this issue · comments
Many irrelevant dom nodes are getting added on the page due to react-lines-ellipsis.
These nodes are used to calculate the position of each character. Why does this bother you?
This increased dom nodes can boil down to performance. Can we somehow calculate the position of characters without adding extra nodes?
This module is performance expensive in any way. Because calculating the position of each character or word with DOM API is just expensive. If you really care about performance that much, you should try the loose version or even modify the UI design to avoid multiline text clamping.
@xiaody we were trying to improve the performance of our web app, will surely try out the loose version.
Thanks a lot for the help 👍
You're welcome.