
On Sat, Nov 16, 2024 at 10:41 PM Vinnie Falco via Boost
On Sat, Nov 16, 2024 at 2:52 AM Klemens Morgenstern via Boost
wrote: I have. error_info contains a string, which allows you to minimizing reallocation by passing it in by reference.
1. Do you have any measurements to show the performance gains for this, and 2. Are you telling us that you "optimized" the case where errors occur?
This is not about performance. You can use sqlite in very resource constrained environments and you can configure it so it never mallocs. The error_info allocates its memory from the same pool and if you constantly realloc, you'll potentially end up fragmenting this memory. It's a very common pattern in those cases to allocate all the memory up front to avoid this fragmentation, and this interface allows that. It also uses realloc internally for the same reason.
Thanks
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost