Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48937 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 740 invoked from network); 21 Jun 2010 19:39:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2010 19:39:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.113 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.113 smtp113.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.113] ([67.192.241.113:44171] helo=smtp113.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/36-62847-EFFBF1C4 for ; Mon, 21 Jun 2010 15:39:43 -0400 Received: from relay21.relay.dfw.mlsrvr.com (localhost [127.0.0.1]) by relay21.relay.dfw.mlsrvr.com (SMTP Server) with ESMTP id A02B02E4016C; Mon, 21 Jun 2010 15:39:39 -0400 (EDT) Received: by relay21.relay.dfw.mlsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 58E792E40208; Mon, 21 Jun 2010 15:39:39 -0400 (EDT) Message-ID: <4C1FBFFA.2070406@sugarcrm.com> Date: Mon, 21 Jun 2010 12:39:38 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Vincenzo D'Amore CC: Internals References: <4C1DE819.2070406@daevel.fr> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Performance problem with php From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > could anybody tell me why also for every single php file engine must lstat > all path? > Why php engine don't simply try to open directly the file? There are some places where PHP engine has to know "true" name of the file - i.e. filename that would be the same for each file regardless of how it is accessed - through relative path, symlinks, etc. Example can be {include|require}_once. For that, it needs to figure out the whole path. It is done only once per file, then cached. If you seeing it on repeated runs in the same process, increase your realpath cache size (yes, the default is way too small for any big app). -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227