Commit 019045a0 authored by Robert Knight's avatar Robert Knight

Add a note about performance considerations of `stripSpaces`

See https://esbench.com/bench/613f1ca06c89f600a570114b for some related
benchmarks.
parent 0d193d1f
......@@ -315,6 +315,10 @@ async function anchorByPosition(pageIndex, start, end) {
/**
* Return a string with spaces stripped and offsets into the input string.
*
* This function optimizes for performance of stripping the main space chars
* that PDF.js generates over handling all kinds of whitespace that could
* occur in a string.
*
* @param {string} str
* @return {[string, number[]]}
*/
......
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