I recently noticed that session_unset in 5.2 (and probably in 6) uses
delete_global_variable which looks up global scope and then deletes
variable from it. Fine so far, but it does it in a loop - meaning it
looks for the global scope each time anew for each session variable!
Also it seems to go through all CVs every time, which seems to be a
waste of time too. Any reason not to do it this way:
1. Fetch the global scope
2. For each CV in the global scope, check if it should be deleted
against session hash (since we have hashes it should be quick).
This way instead of stack depth*number of CVs*number of session vars we
get only stack depth+number of CVs*hash lookup time. Which should be
much better. So anybody sees any reason not to do it?
--
Stanislav Malyshev, Zend Products Engineer
stas@xxxxxxxx http://www.zend.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php