diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-06-16 19:17:57 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-07-18 14:08:44 +0200 |
commit | 67a04fe6cb0f6b0cd3d44ae37b7caddddda198ea (patch) | |
tree | bb7f51c543dd03e6303e91d81fc592b1283e03c3 /src/nvim/msgpack_rpc/unpacker.h | |
parent | 1b462705d049fa0cf2bb99bae9112b84abea8d5a (diff) | |
download | rneovim-67a04fe6cb0f6b0cd3d44ae37b7caddddda198ea.tar.gz rneovim-67a04fe6cb0f6b0cd3d44ae37b7caddddda198ea.tar.bz2 rneovim-67a04fe6cb0f6b0cd3d44ae37b7caddddda198ea.zip |
perf(ui): unpack a single ui event at a time, instead of a "redraw" batch
This reduces the memory overhead for large redraw batches, as a much smaller
prefix of the api object buffer is used and needs to be hot in cache.
Diffstat (limited to 'src/nvim/msgpack_rpc/unpacker.h')
-rw-r--r-- | src/nvim/msgpack_rpc/unpacker.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/msgpack_rpc/unpacker.h b/src/nvim/msgpack_rpc/unpacker.h index e0dc6f0a68..3a5476cd21 100644 --- a/src/nvim/msgpack_rpc/unpacker.h +++ b/src/nvim/msgpack_rpc/unpacker.h @@ -32,8 +32,13 @@ struct Unpacker { Error unpack_error; Arena arena; - // one lenght free-list of reusable blocks + // one length free-list of reusable blocks ArenaMem reuse_blk; + + bool is_ui; + int nevents; + int ncalls; + UIClientHandler ui_handler; }; // unrecovareble error. unpack_error should be set! |