Re: Re: PDO Oracle driver
| From: | Pierre Joye | Date: | Fri, 24 Apr 2015 07:41:53 +0000 |
| Subject: | Re: Re: PDO Oracle driver | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85937@lists.php.net to get a copy of this message | ||
On Fri, Apr 24, 2015 at 1:16 PM, Arvids Godjuks
<arvids.godjuks@gmail.com> wrote:
> 2015-04-24 4:42 GMT+03:00 Benjamin Eberlei <kontakt@beberlei.de>:
>
>> On Thu, Apr 23, 2015 at 3:45 PM, Arvids Godjuks <arvids.godjuks@gmail.com>
>> wrote:
>>
>> > PDO is everywhere. Doctrine? Based on PDO.
>>
>>
>> You can use mysqli, oci8 or sqlsrv for example without problems in
>> Doctrine.
>>
>> Exposing some of the internal api of PDO as php functions (SQL Parser) I
>> would bet it is possible to reimplement PDO in PHP code using mysqli etc..
>> as "drivers".
>>
>> I think we could discuss going that road as well and we could save
>> ourselves maintaining some thousands of lines of C code.
>>
>
> May I question the sanity of the words written in this email? :D (it's a
> joke).
>
> The whole point of mysqlnd drivers and other improvements was to cut down
> on data copying, improving performance and doing a lot of other stuff.
> Moving PDO to a PHP implementation will kill it all: preformance will
> suffer,
I am totally certain that performance will be that bad. Indeed slower
but in relation to the DB IOs, they could be within an acceptable
margin.
> memory usage will skyrocket,
here as well, even less with 7 or already with 5.5+, if done wisely
(did not check PDO lately but it could be improved if not already)
> dealing with charsets - I don't even
> wana pretend I understand how to deal with that part in a proper fasion.
> Doesn't it require access to internal PHP api's to do a lot of what PDO and
> other native drivers do?
It is called userland hooks, no big magic required.
See https://pecl.php.net/package/mysqlnd_uh
for something similar. Not
really prod ready or whatever but a good example to see how something
similar could be done.
> Well, the Zephyr could pitch in here, MAYBE, depending on how good it
> actually is and what it can do, but still, it feels more like a cruch to me.
Good point, not sure how far it exposes PHP internals APIs or if it
does it the same way than it does for system libraries :)
Cheers,
--
Pierre
@pierrejoye | http://www.libgd.org