percy icon indicating copy to clipboard operation
percy copied to clipboard

UTF16 Text

Open dbrgn opened this issue 6 years ago • 2 comments

JavaScript uses UTF16-encoding for strings, while Rust uses UTF8.

The value of VirtualNode::Text is String, so for every DOM update the text needs to be re-encoded.

I wonder if it might make sense to have a VirtualNode::TextUtf16(Vec<u16>) variant for when you already deal with UTF16 text internally? Might give some performance benefits, although I'm not sure how much.

dbrgn avatar Feb 14 '19 15:02 dbrgn

So one thing that I'd like to have ~eventually is benchmarking in real browsers.

The main thing that I was thinking about on the benchmarking front was the diff/patch algorithm .. but something like this would be good also!

chinedufn avatar Feb 14 '19 23:02 chinedufn

Yep, I agree. Performance optimizations without benchmarking are worthless.

dbrgn avatar Feb 14 '19 23:02 dbrgn