Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111082 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 21845 invoked from network); 21 Jul 2020 03:33:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Jul 2020 03:33:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F25CC1804CD for ; Mon, 20 Jul 2020 19:27:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10olkn2089.outbound.protection.outlook.com [40.92.40.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 20 Jul 2020 19:27:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TyOcM/thu0P2X02s+aVKprYvmY1BBihPlp2KqDjOAXXph+tLuwPRNaE3LyQqnIMu7qjq/fqzufnNbn76n1DG79PVlauBAl2dKafa1fmn4zYBUXtwgzF9LI7t4ElwntafzqbXcyIntxyxRHiE2nE/WFo8WfDTQuAdLnSUxGQhrCtmSlyEHDOio9N7jgAz672/2hG+4e9SO+n9tbXQ7U53NXy7Em1uO+W11Qlz57mvmM453YU+CO9uF021Cr4gGhHAuo7gOLNmpdM6bpYuYcPC8+xuU3CzP0oEtjDlyO/3ItuIxArCCxbxJ+c9uu7jM2u8MsSe2pS4HI8Bc7Dbg5o+wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GbPjB1iQye6RujcigP2RFzrxCJ3HeARTf7E6EBgN+2E=; b=mdugxc+LCBZczBNRo33mFLJ/mF7PEbCMYVJHPVHlsexeKJzBoc1rrMYVti3NYsLzm9sdbUAOg9aL7/spEVJYPSlxTeACFK7Zp4xX5b+/gdHOzlJDFPG24xqOKZfqt94S2r+FEI8KZBH7An8zuKQ1l0yT4jRILMdMABi5QOHCOzlkVnXHL9qjxqoZPzKDAzdAhIwQL0EUKnyoMNzWRvbIZmN+HNrprdUOcVCzxBpztu19sliZrUJwmO70LmYn3NoCw6ZbEyoyrJGj2zMHMIwqnfia/Oh4ruXoGr6ZQGUwVs0DF7hKFN2tPaDtm2c3NKRrXOwDS48lNKhVU98j+90bFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GbPjB1iQye6RujcigP2RFzrxCJ3HeARTf7E6EBgN+2E=; b=Al8HgUxBT39ZjKtdFLt1HzZNR+HrRGV0lH8S/Xm+PsnJJ+Zse5A4NXdj6apgcRjxAPo016d/kpjW5mI4i+fsgB6L1v2ai6+7RKhUuphrTv6Av12hniSJUt9+0NBno/7djETh5tWpvmTNNmND7QqoKJWb+Kxl8uLxMY+1RoIdGCJJEsO2L83Pc3Yah4q8tAycf8xUNAt7j5RCcsADY13S6Tk45UGEMXdS+BQ+zKCbbiOBs4r/2i52QrpwqQcbQTZcF3ADuBScZlZ9J9ooeJ78THyUkLv3u2hgjRUxjY362w9BUUuOuEeRfGX53YwLM6v+PQs/rukuN374YVJxUPU1Eg== Received: from BN7NAM10FT063.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::46) by BN7NAM10HT003.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18; Tue, 21 Jul 2020 02:27:51 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com (2a01:111:e400:7e8f::40) by BN7NAM10FT063.mail.protection.outlook.com (2a01:111:e400:7e8f::171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Tue, 21 Jul 2020 02:27:51 +0000 Received: from DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f0c8:f413:c7c1:e934]) by DM6PR07MB6618.namprd07.prod.outlook.com ([fe80::f0c8:f413:c7c1:e934%4]) with mapi id 15.20.3195.025; Tue, 21 Jul 2020 02:27:50 +0000 To: =?iso-8859-2?Q?Micha=B3_Marcin_Brzuchalski?= , PHP Internals List Thread-Topic: [PHP-DEV] Re: [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects Thread-Index: AQHWXtFgqJP43t0OTE2TPa02/q7m7KkROYlE Date: Tue, 21 Jul 2020 02:27:50 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:C2501ED15EA55778CD6AC9E9065EDB446AAA4EFD7AA5A923D789144858F3BFF3;UpperCasedChecksum:8E9E367053BC90FD18D192A902261FEF82C400810246CDAA64B515B8F322EC2C;SizeAsReceived:7285;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [HTX2bC6gvWITokyWCu/HcAh0kcbZxp395xko0f3G0NqsEdBT+CYBcjfeL95Ob0HM] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 63a21b4d-76ad-4583-2a78-08d82d1daa70 x-ms-traffictypediagnostic: BN7NAM10HT003: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hvksma4yG6fxqkecn6nOFl15NwYElHq31Y6qKtk8hGfCxCds90sGD44nma3+A5nS6y3NjM56cVnfheuLvuQPr9BCi4qHfU6uL6V5DoXrAZHz4matXCX2heyMAMqlcs9Q6o/DduFm/8AUK+heOxSGXS2vjfdFeJs7x8WMbMWUuCcLkH8zf4I6obZHy2ERYadLqcsTdJYemPHMvRxPTB+1/Ih0Qx0jlouvK5KB5oeu2Y3r3d9kwk8u3qqVeqABshET x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR07MB6618.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; x-ms-exchange-antispam-messagedata: 6fFh20CmdkkdM+JmXkR7p3T57zBH7uiJ5FOePP5nEy18DzXEUYE2BYWo9NSpsxxNFMVuzYzt5XbkN6S1WC2KUkB15fYAKgvP2Sw5+Xo5WZLznhfqxjr5cvn13tjlrRTn/4fTHicsZa41goEN4hMlmDx9LaZLmrqZ0dII0pCQlbTon6OoJwmUoiPINuK2q7VJ/c5oMF5sazOFkKOhs2ha6w== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT063.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 63a21b4d-76ad-4583-2a78-08d82d1daa70 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2020 02:27:50.8724 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT003 Subject: Re: [PHP-DEV] Re: [RFC][DISCUSSION] debug_backtrace alternative as an array of StackFrame objects From: tysonandre775@hotmail.com (tyson andre) Hi Micha=B3 Marcin Brzuchalski,=0A= =0A= >=A0Heads up, I plan to open the vote tomorrow morning.=0A= =0A= =0A= Sorry for the late comment - I'd been busy/occupied with various other thin= gs and this RFC fell off my radar,=0A= and I'd assumed that anything I'd end up noticing when looking at the RFC = =0A= would have already been pointed out by other reviewers.=0A= (In general, I've only reviewed or locally compiled the code of a small fra= ction of recent RFCs mentioned on the mailing list.)=0A= =0A= I had some comments on the implementation in https://github.com/php/php-src= /pull/5820#pullrequestreview-452045885=0A= =0A= - How much does this change elapsed time in typical use cases? This had com= pletely skipped my mind when I saw this RFC, but I'd generally assume that = stack traces aren't kept along for longer than needed to process them, and = that most stack traces would be at most hundreds of frames in typical appli= cations. So I'd consider CPU time elapsed more important than RAM.=0A= I'd had similar issues with the tradeoffs in PhpToken (and forgot). Those= issues were that the applications using the array would use less memory an= d be faster if I used the returned array multiple times, but less so if I o= nly processed the array once and immediately freed it.=0A= PHP also seems faster at fetching dimension from arrays than properties f= rom objects.=0A= =0A= Still, though, this might help with a bit with developer productivity (e.= g. IDEs being better at inferring types of $frame->getFile() in some cases,= or providing help text for the method), or in being able to check types wh= en passing individual frames=0A= - I found a bug: The ArrayAccess magic methods are implemented, but not the= real methods.=0A= - I found some memory leaks, possibly related to tracking argument arrays i= n the object being stored=0A= =0A= - Casting getFile() to the empty string is unexpected for me ($frame['file'= ] and $frame->file are null in the implementation).=0A= - Forbidding modification/deletion on the ArrayAccess magic API (e.g. `$fra= me['trace'] =3D ...`)=0A= seems inconsistent when modification and deletion are allowed through the= real properties,=0A= (and throwing there may affect code written to process the array returned= by Throwable->getTrace())=0A= - The typed property default was incompatible with the typed property decla= ration (`class StackFrame { string $file =3D null; /*...*/}` for internal s= tack frames)=0A= =0A= With the feature freeze nearby, more of a heads up would have been useful.= =0A= Aside: The guidelines in https://wiki.php.net/rfc/howto have been followed,= =0A= but I think it'd be useful for those guidelines to say "consider *at least*= one days heads up mail on the mailing list" instead of "consider one days"= to avoid cases where review comments are made on short notice.=0A= Normally, any issues found the day before voting starts would have more tim= e to reschedule the vote to be addressed.=0A= =0A= - I don't know how amendments to the howto get proposed or decided on=0A= =0A= Regards,=0A= - Tyson=