Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse-sax: use native TextDecoder in browser when available
Doing a profiling in chrome browser shows that the `Buffer.toString()` is using unexpected long cpu time. With the native TextDecoder it can get much faster in browsers supporting it. In browsers not supporting TextDecoder, like Internet Explorer, we can fallback to `Buffer.toString()`. References: feross/buffer#268 feross/buffer#60 https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder
- Loading branch information