quentez / talonjs

JavaScript port of the Talon email quote parsing library.
MIT License
15 stars 9 forks source link

Upgrade xpath for perf gains (0.28) and max callstack fixes (0.31) #46

Closed dzaman closed 1 year ago

dzaman commented 1 year ago

This performance improvement was made available in 0.28 and callstack fixes were made available in 0.31. This is (at least) a 2x performance improvement for Talon and also allows us to increase the limits without running into fatal errors.

Attached an execution flamegraph which shows that the vast majority of time spent is within xpath.

Screenshot 2023-06-09 at 10 46 57 AM

15495.0x.zip

There maybe some value in updating xmldom because of improvements to their dependencies, but I didn't see any major performance improvements introduced directly to xmldom.

quentez commented 1 year ago

Hey Matthew,

I can merge and update the package on NPM if needed. Was there a reason not to move forward with this?

@dzaman