Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98534 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33586 invoked from network); 15 Mar 2017 09:37:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2017 09:37:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=dz@heroku.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dz@heroku.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain heroku.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: dz@heroku.com X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:34514] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/7D-38004-57B09C85 for ; Wed, 15 Mar 2017 04:37:58 -0500 Received: by mail-wm0-f52.google.com with SMTP id 196so17846878wmm.1 for ; Wed, 15 Mar 2017 02:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heroku.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=PJ+WDfqyVVmCC5V8hsSJmH8iCLsWSLAOBU7i1nwO+Fw=; b=sf2W5e9KRtYGYTQFxjVWlSidVlnZ/4CoVB1//WTCaVgmPxKl879mTeXXz0melMKuz1 iQm4hQIZ7oKKdjok8EC2LTm8DgtuA2Y5CamGz2bENT39oe/mdBqHcY3K9yNDoAbc1Fmb eXcDT9xIkjxYav3owvXoScVMulEvKKANx+GPiyHd3NU7YAYO00L1ioje2Sku57PejLye YxV2K7gqS3SqwSK8Bx0hfDWnptETpZo3v2Cfe2qcj67xPrKkSCSXG4hzwkaRfF5Ijdzo /Vlk6xY7GKNHtAZQvGNoT3fh0FTVGHZX0Bd4Di2gYeLMVTyoE9P8ZqdJhgp3PR8iYJbR MP0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=PJ+WDfqyVVmCC5V8hsSJmH8iCLsWSLAOBU7i1nwO+Fw=; b=m9JJBoF+023RlUR7GXRzRF81rcqe+FsqRzlTrGOlKGQSmllkWgDw6/ERSopCtlJcWS AXwKRw2fOaAVXJBxy2IB3tAZKiIEvuN8TlFxhN7LDvsJJX4p2edn3/Jco3ZlfumRGYVI Q0T0kfiFCX09redsP3OlLnRT4f/DsZmtKPe0b08L5RsTGL4ouTh7NmVqn7JAOX3wdEY2 cffgocaxhgJiLbmVzYGEvMZE/G/Ib/ru24uZ9POHBiagfZbL+nPB/kFmxMNsWj70oqhW wn5qOfjbOluoVc/BQpF8SObQWEe5vFkvX36RIcFmnthYCNheuKX13ok73RCRJZmLEHtS M/yQ== X-Gm-Message-State: AFeK/H2JTZyWdKxQv0MmDFKnVI8aDpmGr944lOm9KT2bdj3fW4XhJk3ePlFFUmIAG5/8VASy X-Received: by 10.28.186.70 with SMTP id k67mr3298570wmf.65.1489570674998; Wed, 15 Mar 2017 02:37:54 -0700 (PDT) Received: from [192.168.19.25] (ipbcc1a96b.dynamic.kabel-deutschland.de. [188.193.169.107]) by smtp.gmail.com with ESMTPSA id j80sm3065294wmd.14.2017.03.15.02.37.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 02:37:54 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) In-Reply-To: Date: Wed, 15 Mar 2017 10:37:53 +0100 Cc: PHP internals list Content-Transfer-Encoding: quoted-printable Message-ID: References: <5BF394D3-919E-4140-AFF9-F46223AB49C4@heroku.com> To: Nikita Popov X-Mailer: Apple Mail (2.3259) Subject: Re: [PHP-DEV] OPcache compilation performance regression in PHP 5.6/7 with huge classes From: dz@heroku.com (David Zuelke) On 14 Mar 2017, at 16:39, Nikita Popov wrote: >=20 > On Tue, Mar 14, 2017 at 11:29 AM, David Zuelke wrote: >> Hi all, >>=20 >> There appears to be a performance regression in the CFG and DFA based = optimization passes of OPcache in PHP 5.6+ when loading huge classes = (such as those generated by Symfony's routing component) for the first = time. >>=20 >> .... >>=20 >> Is this slowness with a cold cache expected/accepted, or does that = qualify as a bug? >=20 > Yes, this is a bug. Optimization should never be this slow. >=20 > =46rom a quick perf run, the problem in the DFA pass is that TI is = quadratic in the number of calls (as call lookup is implemented as a = linear scan). This can be fixed with a more efficient map lookup. > The problem in the CFG pass is that a large buffer is zeroed = repeatedly. Alright, thanks! I opened a bug for it: = https://bugs.php.net/bug.php?id=3D74250