Commit a57389f0 authored by CompileNix's avatar CompileNix

remove optimizeExpressionCollectionOrder

parent d1263495
......@@ -92,20 +92,7 @@ async function sendMail(mailOptions) {
});
}
// sort by expression.matchCounter DESC
function optimizeExpressionCollectionOrder() {
console.log('sort expressions by most used');
config.expressions.sort((first, second) => {
if (first.matchCounter > second.matchCounter) return -1;
if (first.matchCounter < second.matchCounter) return 1;
return 0;
});
console.log(config.expressions);
}
async function filterLog( /** @type {string} */ line) {
if (lineCounter % 100 === 0) optimizeExpressionCollectionOrder();
for (let index = 0; index < config.expressions.length; index++) {
const expression = config.expressions[index];
expression.match.lastIndex = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment