Optimization of encoding string to nginx temp buffer chain