Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54202 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70029 invoked from network); 26 Jul 2011 08:59:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2011 08:59:57 -0000 Authentication-Results: pb1.pair.com header.from=catch56@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=catch56@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: catch56@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-ew0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:46168] helo=mail-ew0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/D2-48186-C028E2E4 for ; Tue, 26 Jul 2011 04:59:57 -0400 Received: by ewy2 with SMTP id 2so228507ewy.29 for ; Tue, 26 Jul 2011 01:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dzEQOUl9BIBOFQlOY0jr/qI4/RBt8dVKJDSgIFmXtb0=; b=D1f3sVTE2e1pUAqUG/b8Mv5bj+CZgqJ0BfNGQEDST2QI0ySubfqG6Wxc0B76xKWoY0 G450aa7UGuTZC4ouy8jgqco10FnqysCV/aVcdu3kCTblGrO0QyW7j3fIisVrwl38zS6/ jslaKTV/eAq43bwePOQhtwvBnL8T0jIMIW43o= MIME-Version: 1.0 Received: by 10.204.42.72 with SMTP id r8mr1697653bke.239.1311670792179; Tue, 26 Jul 2011 01:59:52 -0700 (PDT) Received: by 10.204.78.81 with HTTP; Tue, 26 Jul 2011 01:59:52 -0700 (PDT) In-Reply-To: <4E2E8021.3080306@googlemail.com> References: <4E2E784F.4050307@googlemail.com> <4E2E8021.3080306@googlemail.com> Date: Tue, 26 Jul 2011 17:59:52 +0900 Message-ID: To: sebastian.krebs.berlin@googlemail.com Cc: PHP internals list Content-Type: multipart/alternative; boundary=bcaec554daf4a14ed904a8f52706 Subject: Re: [PHP-DEV] Function/Constant autoloading From: catch56@gmail.com (Nathaniel Catchpole) --bcaec554daf4a14ed904a8f52706 Content-Type: text/plain; charset=ISO-8859-1 > > >> > As far as I can see this is for built-in functions only. The problem I see > is, that APC cannot know, where my functions are located and therefore > cannot load it without userspace help. > > > No it includes userspace functions. My knowledge of APC internals is very weak, but more or less when you load an opcode into APC, the function definitions have to be copied over. This setting changes that so the copying happens when the function is actually called. It should be easy enough to test by generating a file that has a few hundred or so functions defined, then profiling a require of the file before and after with xhprof or similar (should see a memory improvement - or at least, I can see more memory taken up the more functions are defined in the file without this setting, didn't try with it yet). I had missed the PHP 5.3 constant change so my mistake, although that's good to know. Nat --bcaec554daf4a14ed904a8f52706--