scinfu / SwiftSoup

SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)
https://scinfu.github.io/SwiftSoup/
MIT License
4.52k stars 345 forks source link

Optimizations #275

Closed aehlke closed 2 months ago

scinfu commented 2 months ago

thank you

aehlke commented 2 months ago

thanks so much for reviewing / merging

the big one that needs work is consumeToAny. the unicode scalar vs utf8/utf16 indexing is half of it (and maybe the need to make strings utf8 contiguous, I didn't verify), the other is instantiating the new string. maybe it can be reworked to use substrings. I read through the source but couldn't confidently decide what to try