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 realloc less often, like file2memory.
That's a very good idea. Are you willing to work on it? -- / daniel.haxx.se | Get the best commercial curl support there is - from me | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html