From ad09ca9d6d1e47c0b17c7ac651a4cc78c073788b Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Wed, 18 Oct 2023 13:26:53 +0200 Subject: [PATCH] refactor(nodetool): only add libs when necessary --- bin/nodetool | 3 ++- changes/ce/feat-11787.en.md | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changes/ce/feat-11787.en.md diff --git a/bin/nodetool b/bin/nodetool index ab2210aa5..c0d5b0025 100755 --- a/bin/nodetool +++ b/bin/nodetool @@ -21,12 +21,13 @@ main(Args) -> ok end end, - ok = add_libs_dir(), case Args of ["hocon" | Rest] -> + ok = add_libs_dir(), %% forward the call to hocon_cli hocon_cli:main(Rest); ["check_license_key", Key0] -> + ok = add_libs_dir(), Key = cleanup_key(Key0), check_license(#{key => Key}); _ -> diff --git a/changes/ce/feat-11787.en.md b/changes/ce/feat-11787.en.md new file mode 100644 index 000000000..2dc3efc73 --- /dev/null +++ b/changes/ce/feat-11787.en.md @@ -0,0 +1,3 @@ +Improve `emqx` command performance. + +Avoid loading EMQX application code in `nodetool` script unless necessary.