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:

committed by
Johan Wikman

parent
0e7f592bd7
commit
f3b0245c0b
@ -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;
|
||||
|
Reference in New Issue
Block a user