note 113431 added to function.die
| From: | ThomasHorsten | Date: | Wed, 09 Oct 2013 17:28:12 +0000 |
| Subject: | note 113431 added to function.die | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196513@lists.php.net to get a copy of this message | ||
Because die() still allows destructors to be read, after analyzing a huge dataset (more than 12GB)
in RAM, and printing the results, it was taking forever to exit while cleaning up (almost a minute),
time that could have been spent running the next dataset. I noticed that killing the process solved
this, but I needed to do it automatically from inside the script to do batch jobs. Saved me hours
when I found out how. There should be an option to quit without wasting time on destructors. Anyway:
posix_kill(getmypid(), SIGTERM);
----
Server IP: 69.147.83.199
Probable Submitter: 86.30.135.155
----
Manual Page -- http://php.net/manual/en/function.die.php
Edit -- https://master.php.net/note/edit/113431
Del: integrated -- https://master.php.net/note/delete/113431/integrated
Del: useless -- https://master.php.net/note/delete/113431/useless
Del: bad code -- https://master.php.net/note/delete/113431/bad+code
Del: spam -- https://master.php.net/note/delete/113431/spam
Del: non-english -- https://master.php.net/note/delete/113431/non-english
Del: in docs -- https://master.php.net/note/delete/113431/in+docs
Del: other reasons-- https://master.php.net/note/delete/113431
Reject -- https://master.php.net/note/reject/113431
Search -- https://master.php.net/manage/user-notes.php