diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2019-10-08 12:47:16 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2019-10-08 12:49:47 +0200 |
commit | 038eacfbf466f0b51e80b6f5fa9026c7ed767dfb (patch) | |
tree | be514d7ae1d5725e4256920d8e4ef49136ad1136 /test | |
parent | e83dba7f936b541bd37ac549d89502ec466c5ccf (diff) | |
download | libuv-038eacfbf466f0b51e80b6f5fa9026c7ed767dfb.tar.gz libuv-038eacfbf466f0b51e80b6f5fa9026c7ed767dfb.zip |
darwin: speed up uv_set_process_title()
Libuv loaded and unloaded the Core Services and Application Services for
every call to uv_set_process_title().
Change that to load them on the first call to uv_set_process_title() and
delay unloading until libuv is unloaded.
Speeds up process_title_threadsafe by about 10x on my system. It should
fail less often (hopefully not at all) on the CI now.
PR-URL: https://github.com/libuv/libuv/pull/2480
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/test-process-title-threadsafe.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/test-process-title-threadsafe.c b/test/test-process-title-threadsafe.c index 5b30f17f..19098eda 100644 --- a/test/test-process-title-threadsafe.c +++ b/test/test-process-title-threadsafe.c @@ -25,11 +25,7 @@ #include <string.h> -#ifdef __APPLE__ -# define NUM_ITERATIONS 10 -#else -# define NUM_ITERATIONS 50 -#endif +#define NUM_ITERATIONS 50 static const char* titles[] = { "8L2NY0Kdj0XyNFZnmUZigIOfcWjyNr0SkMmUhKw99VLUsZFrvCQQC3XIRfNR8pjyMjXObllled", |