We have quite a huge RegExp (1-2k of symbols, 30-100 groups). And on large bodies (300-500kb) it slows nginx down (1-5 seconds x 2 GHz x 1 core) with huge memory consumption (1-3-10 Gb). Although current impact to the document is quite small (about 1k of replacements). Can provide body + RegExp, but it seems memory usage logic must be rewritten to fit complex cases.
We have quite a huge RegExp (1-2k of symbols, 30-100 groups). And on large bodies (300-500kb) it slows nginx down (1-5 seconds x 2 GHz x 1 core) with huge memory consumption (1-3-10 Gb). Although current impact to the document is quite small (about 1k of replacements). Can provide body + RegExp, but it seems memory usage logic must be rewritten to fit complex cases.