Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85937 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31009 invoked from network); 24 Apr 2015 07:41:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2015 07:41:58 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.181 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.181 mail-qc0-f181.google.com Received: from [209.85.216.181] ([209.85.216.181:34615] helo=mail-qc0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/41-19336-3C3F9355 for ; Fri, 24 Apr 2015 03:41:56 -0400 Received: by qcyk17 with SMTP id k17so21812447qcy.1 for ; Fri, 24 Apr 2015 00:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kAxJL7kK9pEnqh3lzIdKKNt21RVs0dzCNxgAGRTxhE0=; b=dSB+Uu0nGqHOlEahja08gkg0MlS5ge8ssPcp1PDOe4gzIi2Vp0ckHpXkhapuMf2TJ8 iZm7v5lAOVxWmN7Nbc0/BSA55EukQqBBfO7TgPgNiG2AH9mHD8fwRIdfTofI1SX+T70G tFdliSr2wDsX75c1hJu2JPqp6mcPDoBDNUaqoIRY+wS0PV+f5H8ZrJve0AwTolcMHfEu lf2qOYrM3M1RpBREcOFRlCf5FIevDKYepPkM0KN9ppeoT6xKh1TxQeOh9yVWDgfv09ub I5FqO1s/XVFCZS6CeMmMCwc26U/yolG/4apULw+FayaulXh78tKvvgKydKeQ4VCW7UAE 9GAw== MIME-Version: 1.0 X-Received: by 10.55.22.222 with SMTP id 91mr12933210qkw.101.1429861313480; Fri, 24 Apr 2015 00:41:53 -0700 (PDT) Received: by 10.96.39.195 with HTTP; Fri, 24 Apr 2015 00:41:53 -0700 (PDT) In-Reply-To: References: <5537826A.9010209@gmx.de> <5538881C.8010502@oracle.com> <5538C2A7.4050600@lsces.co.uk> <5538CF4B.5090401@beccati.com> <5538D9B0.5020507@lsces.co.uk> Date: Fri, 24 Apr 2015 14:41:53 +0700 Message-ID: To: Arvids Godjuks Cc: Benjamin Eberlei , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: PDO Oracle driver From: pierre.php@gmail.com (Pierre Joye) On Fri, Apr 24, 2015 at 1:16 PM, Arvids Godjuks wrote: > 2015-04-24 4:42 GMT+03:00 Benjamin Eberlei : > >> On Thu, Apr 23, 2015 at 3:45 PM, Arvids Godjuks >> 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