note 82924 added to function.uniqid

From: Date: Fri, 02 May 2008 05:58:46 +0000
Subject: note 82924 added to function.uniqid
Groups: php.notes 
Request: Send a blank email to php-notes+get-138985@lists.php.net to get a copy of this message
Well, I am also wondering, how slow uniqID is. In loop of my script, with just a 500.000 itterations, bring my script from 12s to 120s. As somebody bellow noticed, yeah, to be completly uniq, has to count with MD5 collisions and also fact, script can be hosted in some kind of cluster webhosting, and, I guess, uniqID is based on system time which is different on different machines in cluster. What confuse me (and I found its terribly slow quite late, during implementing script in server), uniqID is extremly slow only in my linux server, not in windows testing machine. The same script tooks 15s in Win machine and the same script tooks 120s in linux one. After hours, tracing where the slowing comes from, I found its uniqID (plus the difference between CPUs, Win's one is quite old celeron, server has dualcore Opteron). ---- Server IP: 212.24.129.51 Probable Submitter: 81.90.163.53 ---- Manual Page -- http://www.php.net/manual/en/function.uniqid.php Edit -- https://master.php.net/note/edit/82924 Del: integrated -- https://master.php.net/note/delete/82924/integrated Del: useless -- https://master.php.net/note/delete/82924/useless Del: bad code -- https://master.php.net/note/delete/82924/bad+code Del: spam -- https://master.php.net/note/delete/82924/spam Del: non-english -- https://master.php.net/note/delete/82924/non-english Del: in docs -- https://master.php.net/note/delete/82924/in+docs Del: other reasons-- https://master.php.net/note/delete/82924 Reject -- https://master.php.net/note/reject/82924 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#138985) next »