I’ve got an experimental branch using flexmark instead of pegdown, it seems to be working.
https://github.com/zspitzer/lucee-docs/tree/LD-109-flexmark-parser
apart from being faster, the nice thing is flexmark is threadsafe, so we can build in parallel, using each
(minor aside, the argument validation for parallel and maxthreads could be stricter, you can mix them up and lucee doesn’t complain, ie parallel=8 and maxthreads=true doesn’t throw an error)
anyway, here are the numbers
/build_docs/all/ 93,561ms, 1 threads, 5.2.6.60 pegdown
/build_docs/all/ 70,040ms, 1 threads, 5.2.6.60 flexmark
/build_docs/all/ 46,532ms, 2 threads, 5.2.6.60 flexmark
/build_docs/all/ 32,314ms, 4 threads, 5.2.6.60 flexmark
/build_docs/all/ 29,809ms, 8 threads, 5.2.6.60 flexmark
/build_docs/all/ 34,434ms, 16 threads, 5.2.6.60 flexmark
it seems 4 threads is the sweet spot, my desktop doesn’t have a SSD, but it’s a grunty i7-6700,
there’s a lot of file i/o, so it might do better with a SSD
on my old laptop, a core i7-3632 with a ssd
/build_docs/all/ 199,992ms, 1 threads, 5.2.6.60 pegdown
/build_docs/all/ 183,835ms, 1 threads, 5.2.6.60 flexmark
/build_docs/all/ 116,618ms, 2 threads, 5.2.6.60 flexmark
/build_docs/all/ 81,473ms, 4 threads, 5.2.6.60 flexmark
/build_docs/all/ 61,755ms, 8 threads, 5.2.6.60 flexmark
/build_docs/all/ 59,213ms, 12 threads, 5.2.6.60 flexmark
/build_docs/all/ 59,972ms, 16 threads, 5.2.6.60 flexmark
last update: also doing the import in parallel on my desktop
/build_docs/all/ 22,296ms, 8 threads, 5.2.6.60