-
Notifications
You must be signed in to change notification settings - Fork 972
Closed
Description
const Turndown = require("turndown");
console.time("2500");
new Turndown().turndown('<img src="1" />\n'.repeat(2500));
console.timeEnd("2500");
console.time("5000");
new Turndown().turndown('<img src="1" />\n'.repeat(5000));
console.timeEnd("5000");
console.time("10000");
new Turndown().turndown('<img src="1" />\n'.repeat(10000));
console.timeEnd("10000");In my machine (Mac mini (M1, 2020)) the log is as follows:
2500: 505.093ms
5000: 1.891s
10000: 7.371s
The time spent does not seem to increase linearly. When the image tag count reaches about 10,000, it takes about 7s and caused serious performance problems.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels