danielmewes / php-rql

A PHP client driver for the RethinkDB query language (ReQL).
http://php-rql.dnsalias.net/
339 stars 60 forks source link

Type conversion takes a serious amount of time #146

Open Aeolun opened 7 years ago

Aeolun commented 7 years ago

Hi,

I'm not entirely sure why it happens, and I suppose there is a good reason for it, but when I query an object, the single request (to a rather large document, to be fair) takes 0.3s in total. That felt quite long for a query to a table with a single document, but specifically for the php library, converting the returned json response to a datum, and back to a native document (an ArrayObject), takes 0.22s of that total.

Considering what I'm looking to receive is a php stdObject, I'm a bit confused as to why this whole step has to take place? It appears we're going from native, to a bunch of objects, to native again.