Return results as sets of packets

Returning the results of a query as a set of packets is currently more
efficient. This is mainly due to the fact that each individual packet for
single packet routing is allocated from the heap which causes a
significant loss in performance.

Took the new capability into use in readwritesplit and modified the
reply_is_complete function to work with non-contiguous results.
This commit is contained in:
Markus Mäkelä
2017-10-09 16:14:36 +03:00
committed by Johan Wikman
parent 0e7f592bd7
commit f3b0245c0b
4 changed files with 65 additions and 126 deletions

View File

@ -676,6 +676,11 @@ int modutil_count_signal_packets(GWBUF *reply, int n_found, bool* more, modutil_
}
offset += pktlen;
if (offset >= GWBUF_LENGTH(reply) && reply->next)
{
offset -= GWBUF_LENGTH(reply);
reply = reply->next;
}
}
int total = err + eof + n_found;