diff options
author | Siri Hansen <[email protected]> | 2017-11-02 17:04:03 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-11-02 17:04:03 +0100 |
commit | ecb7a05eb0f8912ef972489be2b7d648065b51c7 (patch) | |
tree | 0e7c8c94b0cd7659a7b3e4629067e3e19effb275 /lib/common_test | |
parent | 21b920e38078412f3d47442b27b40b3601a1c7d7 (diff) | |
download | otp-ecb7a05eb0f8912ef972489be2b7d648065b51c7.tar.gz otp-ecb7a05eb0f8912ef972489be2b7d648065b51c7.tar.bz2 otp-ecb7a05eb0f8912ef972489be2b7d648065b51c7.zip |
[ct] Remove call to application:which_applications()
The cth_log_redirect hook calls this function to check if the sasl
application is started. This is done for each error logger event.
In most systems, this is not a big problem, but on native compiled
code this call can be very slow if the message queue is long. This is
because huge message queue optimization is not implemented for native.
Diffstat (limited to 'lib/common_test')
-rw-r--r-- | lib/common_test/src/cth_log_redirect.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl index 8b29d0f96d..1c55e17686 100644 --- a/lib/common_test/src/cth_log_redirect.erl +++ b/lib/common_test/src/cth_log_redirect.erl @@ -121,8 +121,8 @@ handle_event({_Type,GL,_Msg}, #eh_state{handle_remote_events = false} = State) when node(GL) /= node() -> {ok, State}; handle_event(Event, #eh_state{log_func = LogFunc} = State) -> - case lists:keyfind(sasl, 1, application:which_applications()) of - false -> + case whereis(sasl_sup) of + undefined -> sasl_not_started; _Else -> {ok, ErrLogType} = application:get_env(sasl, errlog_type), |