I was noticing an endless hang when using mocha and filed this issue and managed to run down the problem in mocha to the use of jsdiff. Their use of createPatch here seems to cause an almost endless loop.
While it would eventually fail once maxEditLength is exceeded this would take ages as diagonalPath grows at the rate of editLength here.
The test has a maxEditLength of 57579 and even after about ~10 minutes of processing editLength is only 4542. Sadly it gets exponential worse.
I was noticing an endless hang when using mocha and filed this issue and managed to run down the problem in mocha to the use of jsdiff. Their use of
createPatchhere seems to cause an almost endless loop.While it would eventually fail once
maxEditLengthis exceeded this would take ages asdiagonalPathgrows at the rate ofeditLengthhere.The test has a
maxEditLengthof 57579 and even after about ~10 minutes of processingeditLengthis only 4542. Sadly it gets exponential worse.