Improve the performance of HostingServiceClient._build_form_data
Review Request #8910 — Created April 21, 2017 and submitted — Latest diff uploaded
The method in question was doing multiple string concatenations with
+=
, which is very inefficient for large number of operations becuase
each operation results in a memory allocation. We now build a single
string with string interpolation for each field and file passed in and
join all the blobs together, which will require only a single memory
allocation for the final string, instead ofO(|fields| + |files|)
allocations.
Ran unit tests.