Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Looping through strings in Javascript land is a lot slower than having the JS engine do it natively. String's indexOf does this faster than looping through each character. This change deals with parsed data (i.e. the raw text between the tags), attribute values (what's in the quotes) and inside XML comments. These three types of data account for a very large portion of characters in any XML document, leaving behind mainly names of tags and of attributes. It might be worth it to rewrite the switch statement, or move the optimisations into the switch statement itself.
- Loading branch information