Newsgroups: php.internals,php.pecl.dev Path: news.php.net Xref: news.php.net php.internals:64000 php.pecl.dev:10000 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91342 invoked from network); 21 Nov 2012 02:40:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Nov 2012 02:40:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vb0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:53726] helo=mail-vb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/80-20662-C0F3CA05 for ; Tue, 20 Nov 2012 21:40:13 -0500 Received: by mail-vb0-f42.google.com with SMTP id fs19so2967556vbb.29 for ; Tue, 20 Nov 2012 18:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=aV0gqjwbtwWiAElfBclFKk7YsdGvjQF+3ku1Fh/Aysg=; b=klM3L7KsaHUnYQOX6yAN1MlBaeqdBynu9AcW8pB2lSOF20j6oxywakOkGePGq/lX/T X+9XYTpfr+gA1WWZWSdZj2rSPf+MisJxzvdZo5PbfJtqSO43hFcfmjKT1Gr5yZTc60uh FUh8ACxs0FvBdkF4Om/Qv41X9vP5arqQ+zwWZX1XWJRR8FGuS7lOM18zqlHMNVdu2d+I 8/Cq0UjiW2mQ2B1DBOrSnzevVgUMl0sSk5LkOf0B3tyGS228hSLRVWrqYzIFs+DvkeSK YSnWCd05G8sEGTTaxyxZNlGktQ7HtuGqAxNmIjL3Q9yusqxxIDZl0HK7D9QXL6c67jUl w7bw== Received: by 10.220.230.133 with SMTP id jm5mr26814416vcb.4.1353465610423; Tue, 20 Nov 2012 18:40:10 -0800 (PST) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.221.12.8 with HTTP; Tue, 20 Nov 2012 18:39:50 -0800 (PST) Date: Wed, 21 Nov 2012 10:39:50 +0800 X-Google-Sender-Auth: mm_ah0YaePdRWId4GossNvQP8NM Message-ID: To: Dmitry Stogov , PHP Internals , PECL Announce Content-Type: text/plain; charset=UTF-8 Subject: Expose zend_message_dispatcher_p From: laruence@php.net (Laruence) Hey: This problem come out when I was figuring a performance issue of Yaf_Loader. Yaf provides a autoloader like PSR0, when doing a classes autoloading. it used to: 1. stat the file, if file does not exists, return 2. zend_compile_file this is okey when you run yaf without opcode cache. but when you run yaf with opcode cache, the first stat syscall become a little waste. since opcode cache always hook the zend_compile_file, and compile the file from cache. so, I changed the autoload to: 1. zend_compile_file 2. if compile failed, then return. but, zend_compile_file will throw warning if the file doesn't exists via zend_message_dispatcher_p so if zend_message_dispatcher_p is ZEND_API, then I can avoid using such mess codes: https://github.com/laruence/php-yaf/blob/master/yaf_loader.c#L377 what do you think? thanks -- Laruence Xinchen Hui http://www.laruence.com/