quickbooks-php
quickbooks-php copied to clipboard
Persistent HTTP connections / connection reuse
Hi there,
I am running a large sync workload and wondering why the SDK is opening/closing hundreds of HTTP requests.
Is it possible to make the SDK use persistent connections, like http://technosophos.com/2012/06/18/connection-sharing-curl-php-how-re-use-http-connections-knock-70-rest-network-time.html ?
Cheers, Jason
I managed to get this working by modifying HTTP.php to make the curl handler $ch global so it can be reused. Performance more than doubled when making repetitive API calls.
Now only one SSL connection is negotiated per running instance of the connector and it is reused for the life of all API calls.