On Sun, May 29, 2005 at 07:28:16PM +0200, Byrial Jensen wrote:
> When a Row object is constructed, it will copy all data of the fetched
> row of type MYSQL_ROW to a vector of std::string. That seems to me as
> unnecessary use of time and memory. The row data is only accessed
> through pointers to const char:
Something to remember is that Row objects are stored in containers
when using SSQLS, as far as I can tell, so this would create a hidden
dependency on the Result object: all Row object data would disappear if
their lifetimes exceeded the lifetime of the corresponding Result.
i.e. The Result destructor calls mysql_free_result() via Result::purge().
> I have a program where this patch gives more than 20 % decrease of the
> execution time (from 99 down to 77 seconds) when it runs on an otherwise
> idle Linux box.
This is pretty cool, but perhaps it would be better served with a new
row object that is optimized for this. This is up to Warren, but 20%
is a nice chunk of CPU time.