On Thu, 12 Sep 2019, Gilles Vollant wrote:
Here is a modified file2string
Thanks. I edited it ever so slightly and submitted it as a PR here:
https://github.com/curl/curl/pull/4336
--
/ daniel.haxx.se | Get the best commercial curl support there is - from me
| Private h
}
strcpy(string + stringlen, buffer);
stringlen += buflen;
}
}
*bufp = string;
return PARAM_OK;
}
-Message d'origine-
De : Daniel Stenberg [mailto:dan...@haxx.se]
Envoyé : jeudi 12 septembre 2019 09:29
À : Gilles Vollant via curl-library
Cc : Gilles Vollant
Obj
On Thu, 12 Sep 2019, Gilles Vollant via curl-library wrote:
And in src/tool_paramhlp.c, the function file2string does very often realloc
Oh right. Once *per line* of the file. For a 100MB json file, I bet that can
end up in quite a lot of reallocs!
So I suggest modifying file2string to call