Skip to content

Add a benchmark for helpers.ShellEscape and optimise it

What does this MR do?

Improve the performance of helpers.ShellEscape - 1MiB of data goes from taking 430 seconds to taking 0.02 seconds. 4 orders of magnitude.

Why was this MR needed?

Encoding large blobs of data - such as an extensive tls-ca-file - is ridiculously expensive at the moment. This implementation produces the same output, just faster.

What are the relevant issue numbers?

Closes #1801 (closed)

/cc @ayufan @tmaczukin @drewcrawford

Merge request reports

Loading