diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-04-29 10:32:14 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-04-29 10:35:40 +0200 |
commit | 0d1bc795f89c211e302c617bd502cf43b2c2ca4c (patch) | |
tree | 70b1ac02317f5ad37c50a97833fda5100abe3b6c /src/nvim/main.c | |
parent | ab1c2220f0c7f63e2081eb22544fed9fc4b4c611 (diff) | |
download | rneovim-0d1bc795f89c211e302c617bd502cf43b2c2ca4c.tar.gz rneovim-0d1bc795f89c211e302c617bd502cf43b2c2ca4c.tar.bz2 rneovim-0d1bc795f89c211e302c617bd502cf43b2c2ca4c.zip |
perf(ui_client): skip some initialization not necessary for ui client
In particular, TUI manages its own screen buffers and highlight table, so we don't need
to run init_highlight() and default_grid_alloc() in the ui client process.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 608684bd36..e2a3d32984 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -355,6 +355,12 @@ int main(int argc, char **argv) ui_client_channel_id = rv; } + if (ui_client_channel_id) { + time_finish(); + ui_client_run(remote_ui); // NORETURN + } + assert(!ui_client_channel_id && !use_builtin_ui); + TIME_MSG("expanding arguments"); if (params.diff_mode && params.window_count == -1) { @@ -397,12 +403,6 @@ int main(int argc, char **argv) input_start(); } - if (ui_client_channel_id) { - time_finish(); - ui_client_run(remote_ui); // NORETURN - } - assert(!ui_client_channel_id && !use_builtin_ui); - // Wait for UIs to set up Nvim or show early messages // and prompts (--cmd, swapfile dialog, …). bool use_remote_ui = (embedded_mode && !headless_mode); |