-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I think many parsers are built so they can parse multiple html files one after another while using the same instance.
I assume you will get fastly different numbers if you rewrite this https://github.com/victornpb/benchmark-html-parser-libraries/blob/master/tests/sax.js
const sax = require("sax");
module.exports = function (html) {
return new Promise((resolve, reject) => {
const parser = sax.parser(false);
parser.onend = resolve;
parser.onerror = reject;
parser.write(html);
parser.close();
});
};to something like this
const sax = require("sax");
const parser = sax.parser(false);
module.exports = function (html) {
return new Promise((resolve, reject) => {
parser.onend = resolve;
parser.onerror = reject;
parser.write(html);
parser.close();
});
};Metadata
Metadata
Assignees
Labels
No labels