Branch: Tag:

2014-11-22

2014-11-22 02:09:29 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Rebalance threads, cut away some fat and unnecessary mutexes.

The benchmark performance is now within spitting distance of the
old pgsql driver for the unbatched single queries.
For large batches (>20), the new driver beats everyone pants down.
For single batches (==1), the new driver is about 2% slower than
the old 7.8 version.

656:    _msgsreceived++;    _bytesreceived+=1+msglen;    int errtype=NOERROR; -  PD("%d>",ci->socket->query_fd()); +  PD("%d<",ci->socket->query_fd());    switch(msgtype) {    array(mapping) getcols() {    int bintext=cr->read_int8();
845:   #endif    if(portal._tprepared)    portal._tprepared.datatypeoid=a; -  callout(portal->_preparebind,0,a); +  Thread.Thread(portal->_preparebind,a);    break;    }    case 'T': {