Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36243 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52728 invoked from network); 21 Mar 2008 17:16:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Mar 2008 17:16:57 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:27937] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/B4-26785-88DE3E74 for ; Fri, 21 Mar 2008 12:16:57 -0500 Received: (qmail 3664 invoked from network); 21 Mar 2008 17:16:53 -0000 Received: from unknown (HELO ?10.1.20.19?) (10.1.20.19) by cvs.zend.com with SMTP; 21 Mar 2008 17:16:53 -0000 Message-ID: <47E3ED83.9010105@zend.com> Date: Fri, 21 Mar 2008 20:16:51 +0300 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Gregory Beaver CC: internals Mailing List , Stanislav Malyshev References: <47E2F8FA.20107@chiaraquartet.net> <47E37C42.10308@zend.com> <47E3E7F1.3060200@chiaraquartet.net> In-Reply-To: <47E3E7F1.3060200@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] REMINDER - stream wrappers in include_path From: dmitry@zend.com (Dmitry Stogov) Gregory Beaver wrote: > Dmitry Stogov wrote: >> Hi Greg, >> >> I've fixed your patch to work with all functions (fopen, >> file_get_contente). >> Please verify it with ext/phar and then I'll commit it. >> >> Thanks. Dmitry. >> >> Gregory Beaver wrote: >>> Hi, >>> >>> Please look at the stream wrappers in include_path patch I posted >>> last week. >>> >>> Thanks, >>> Greg >>> > Hi Dmitry, > > the patch has a few major problems and a few minor ones. First off, > there are spaces instead of tabs, which is not a huge deal, I've > corrected that in the attached patch. thanks. > It is, however, logically void to do stream wrapper operations in > plain_wrapper.c. I removed that code entirely. Instead, the path > resolve is now done in php_stream_open_wrapper_ex where it belongs, > before determining which stream wrapper to open. this is probably better, but then we should probably remove include_path from plain_file_wrapper at all. > This will result in a > double call to the function when calling include, but because the 2nd > call will simply return after determining it has received a full path. I'll need to look into it more careful. > I've attached 2 patches (apparently, Zend is not included in cvs diff -u > of php5), 1 for adding path resolution to include/require (this is a > significant performance improvement over the existing code). The second > patch adds stream wrapper support to both php_resolve_path and > _php_stream_open_wrapper_ex, which automatically gives stream wrapper in > include_path support to all current and future functions that use > include_path. I'm not sure about performance improvement. This patch might make performance degradation especially for PHP with opcode caches. I'll need to look into the patches and benchmark them. Sorry, but I'll able to do it only on next week. May be you'll get some ideas and improve the patch before I'll start. Thanks. Dmitry. > Greg