diff options
author | Rory Byrne <[email protected]> | 2015-05-28 19:41:25 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-02-03 12:14:11 +0100 |
commit | 264a5e804d6e23bf6c6916887669760cbf243caa (patch) | |
tree | 36c811242327adf2da0cde5003ac486a75f70602 /lib/sasl | |
parent | 4422cb32637a341eac2dc03172e4aa859be67f34 (diff) | |
download | otp-264a5e804d6e23bf6c6916887669760cbf243caa.tar.gz otp-264a5e804d6e23bf6c6916887669760cbf243caa.tar.bz2 otp-264a5e804d6e23bf6c6916887669760cbf243caa.zip |
Speed up supervisor:count_children/1; simple_one_for_one
Speed up supervisor:count_children/1 for simple_one_for_one
supervisors. This is achieved by avoiding looping through all the
child process and verifying that each one is alive.
For a supervisor with 100,000 'temporary' children the count-time will
drop from approx 25ms to about 0.005ms.
For a supervisor with 100,000 'permanent' or 'transient' children the
count-time will drop from approx 30ms to about 0.005ms.
This avoids having the supervisor block for an extended period while
the count takes place. Under normal circumstances the accuracy of the
result should also improve since the duration is too short for many
processes to die during the count.
Diffstat (limited to 'lib/sasl')
-rw-r--r-- | lib/sasl/test/release_handler_SUITE.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index d57de2593a..ee620dcdb4 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -1363,7 +1363,7 @@ upgrade_supervisor(Conf) when is_list(Conf) -> %% Check that the restart strategy and child spec is updated {status, _, {module, _}, [_, _, _, _, [_,_,{data,[{"State",State}]}]]} = rpc:call(Node,sys,get_status,[a_sup]), - {state,_,RestartStrategy,[Child],_,_,_,_,_,_} = State, + {state,_,RestartStrategy,[Child],_,_,_,_,_,_,_} = State, one_for_all = RestartStrategy, % changed from one_for_one {child,_,_,_,_,brutal_kill,_,_} = Child, % changed from timeout 2000 |