Draft: Improve bash script generator performance
What does this MR do?
- Reduces allocations in
bash
'sGenerateScript()
:- Removes
fmt.Sprintf
use and usesstrconv.Quote
directly where needed (on path names). - Uses
WriteString()
in a loop with space separators rather usingstrings.Join
.
- Removes
- Reuses buffers for
escape
when POSIX/ANSI-C escaping mode is enabled.
Why was this MR needed?
I don't think the readability suffers from the changes and we cut some overhead.
What's the best way to test this MR?
Running a job should still work the same.
What are the relevant issue numbers?
Edited by Arran Walker