mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
perf(ui): reduce allocation overhead when encoding "redraw" events
Note for external UIs: Nvim can now emit multiple "redraw" event batches before a final "flush" event is received. To retain existing behavior, clients should make sure to update visible state at an explicit "flush" event, not just the end of a "redraw" batch of event. * Get rid of copy_object() blizzard in the auto-generated ui_event layer * Special case "grid_line" by encoding screen state directly to msgpack events with no intermediate API events. * Get rid of the arcane notion of referring to the screen as the "shell" * Array and Dictionary are kvec_t:s, so define them as such. * Allow kvec_t:s, such as Arrays and Dictionaries, to be allocated with a predetermined size within an arena. * Eliminate redundant capacity checking when filling such kvec_t:s with values.
This commit is contained in:
@@ -11,10 +11,6 @@
|
||||
# include "msgpack_rpc/unpacker.c.generated.h"
|
||||
#endif
|
||||
|
||||
#define kv_fixsize_arena(a, v, s) \
|
||||
((v).capacity = (s), \
|
||||
(v).items = (void *)arena_alloc(a, sizeof((v).items[0]) * (v).capacity, true))
|
||||
|
||||
Object unpack(const char *data, size_t size, Error *err)
|
||||
{
|
||||
Unpacker unpacker;
|
||||
|
Reference in New Issue
Block a user