Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77020 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26156 invoked from network); 1 Sep 2014 21:45:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2014 21:45:50 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain realplain.com does not designate 216.33.127.82 as permitted sender) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 216.33.127.82 mta31.charter.net Solaris 10 1203 Received: from [216.33.127.82] ([216.33.127.82:55930] helo=mta31.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/D3-03336-C09E4045 for ; Mon, 01 Sep 2014 17:45:48 -0400 Received: from imp10 ([10.20.200.15]) by mta31.charter.net (InterMail vM.8.01.05.02 201-2260-151-103-20110920) with ESMTP id <20140901214546.JUBZ6769.mta31.charter.net@imp10>; Mon, 1 Sep 2014 17:45:46 -0400 Received: from mtaout002.msg.strl.va.charter.net ([68.114.190.27]) by imp10 with smtp.charter.net id lxlm1o0010buw5Q05xlmky; Mon, 01 Sep 2014 17:45:46 -0400 Received: from impout004 ([68.114.189.19]) by mtaout002.msg.strl.va.charter.net (InterMail vM.9.00.010.00 201-2473-137) with ESMTP id <20140901214545.NMXE16771.mtaout002.msg.strl.va.charter.net@impout004>; Mon, 1 Sep 2014 16:45:45 -0500 Received: from pc1 ([96.35.251.86]) by impout004 with charter.net id lxll1o00E1sc0so01xllKN; Mon, 01 Sep 2014 16:45:45 -0500 X-Authority-Analysis: v=2.1 cv=I5nrRbQg c=1 sm=1 tr=0 a=Is5gsZaFXO8aPum+t7Tz+g==:117 a=Is5gsZaFXO8aPum+t7Tz+g==:17 a=hOpmn2quAAAA:8 a=hrnPcQGoKqUA:10 a=3sBgxdPApI8A:10 a=WUgRJF_wMoEA:10 a=N659UExz7-8A:10 a=BCPeO_TGAAAA:8 a=NEAV23lmAAAA:8 a=67BIL_jfAAAA:8 a=oo2_TbCWDwNK5NK4IJoA:9 a=pILNOxqGKmIA:10 Message-ID: <687BE274F5C24DE1A42E3484C7E52B6C@pc1> To: "Stas Malyshev" , Cc: "Pierre Joye" , "Anatol Belski" References: <5404DBD1.8050604@sugarcrm.com> Date: Mon, 1 Sep 2014 16:45:45 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: Re: [INTERNALS-WIN] [PATCH] Microsecond resolution and accuracy on Windows From: php_lists@realplain.com ("Matt Wilmas") Hi Stas, ----- Original Message ----- From: "Stas Malyshev" Sent: Monday, September 01, 2014 > Hi! > >> It's much more optimized than what's there now, and slightly over the old >> implementation. Not sure if I should give the saved patch link, or the >> "live compare" (?) on Github, so I'll do both for now: >> http://realplain.com/php/microtime_5_4.diff >> https://github.com/matt-moo/php-src/compare/PHP-5.4.diff >> >> Against 5.4 since that's what I quickly worked on so it's ready for the >> next >> 5.4 release (Stas?). (Although I guess we're supposed to change the >> oldest >> branch usually?) > > Looking at the patch, it looks like unfortunately it changes a global > structure (_php_win32_core_globals) which breaks binary compatibility. I > think if you move the additional value to the end of the structure it > should be ok though, since other offsets should not change then. I was wondering about that myself (back when it was changed last, March 2013) when a few members were removed from that structure, so I figured it was OK to put one back. :-) No problem with binary compatibility then...? http://git.php.net/?p=php-src.git;a=commitdiff;h=b903d2d6cdf9a9efac181a21e95ea93dc8a864dd#patch5 > I'm also not sure how important it is how have it for 5.4. Does the > problem that this patch fixes exist only in older versions of Windows or > on all versions? What are the actual effects of this problem - is it > just lower resolution of microtime or there can be something seriously > wrong with the whole result? If it's just lower resolution, I'd prefer > this to go into 5.5 as the change is pretty extensive. I don't think the change is that extensive (maybe if you're comparing to current version ;-)). As I said in my first "5.4 - last call" reply, it's similar to the previous old version. You can see what was removed from time.c last March in the above diff... My changes are like a simplified version of that (there for over a decade), restored, but without the possibility of "seriously wrong results" (not an issue now either, but we've also had very low resolution). The issues, and these changes, don't affect Windows 8/Server 2012 and later (they have a high-res time function like *nix gettimeofday()). So Win 7 and before. See referenced bugs: #64633, #65626 (uniqid()) Thanks, Matt