FML, something that’s changed between Node 12.16.2 and 18.16.0 has made the OCSP stapling library I’m using¹ 1,000× slower (~4ms vs ~4s per request).
At least I know where the issue is… Tomorrow, I dig into the library to try and narrow it down further.
(The network graph in Firefox was useful as it showed that the problem was with the TLS Setup. And 0x² and its flame graphs helped me narrow it down further.)
¹ https://github.com/indutny/ocsp#ocsp-apis-for-nodejs-
² https://github.com/davidmarkclements/0x#readme
Right, well, whatever the regression is, it doesn’t exist in Node 20.3.1.
To whit, the time it takes to run my SNICallback:
Node 12.16.2: ~10ms
Node 18.16.1: ~4,000ms
Node 20.3.1: ~10ms
So there’s been a *massive* regression in performance in something in Node 18 (LTS) – buffers/strings? – that appears to be fixed in Node 20 (but not backported) that’s affecting the ocsp module.
CC @indutny – if you get a chance, could you possibly let the right folks at Node core know about this? Thanks :)
Right, well, whatever the regression is, it doesn’t exist in Node 20.3.1.
To whit, the time it takes to run my SNICallback:
Node 12.16.2: ~10ms
Node 18.16.1: ~4,000ms
Node 20.3.1: ~10ms
So there’s been a *massive* regression in performance in something in Node 18 (LTS) – buffers/strings? – that appears to be fixed in Node 20 (but not backported) that’s affecting the ocsp module.