<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/msgpack_rpc, branch mix</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>refactor: replace char_u with char</title>
<updated>2022-08-25T16:59:12+00:00</updated>
<author>
<name>Dundar Goc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2022-07-31T14:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=40855b0143a864739a6037921e15699445dcf8a7'/>
<id>40855b0143a864739a6037921e15699445dcf8a7</id>
<content type='text'>
Work on https://github.com/neovim/neovim/issues/459
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work on https://github.com/neovim/neovim/issues/459
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): provide a temporary copy solution for nvim_call_atomic</title>
<updated>2022-08-24T12:22:26+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-08-23T11:52:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=7784dc9e0d90284b0d9c9cf0833c27d4de22b7f4'/>
<id>7784dc9e0d90284b0d9c9cf0833c27d4de22b7f4</id>
<content type='text'>
Make the copy_object() family accept an optional arena. More than
half of the callsites should be refactored to use an arena later
anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the copy_object() family accept an optional arena. More than
half of the callsites should be refactored to use an arena later
anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(arena): use a shared block freelist</title>
<updated>2022-08-24T12:22:26+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-08-23T08:36:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=bcf5ee328e228d5a536b4de2069a79234f9f3e9e'/>
<id>bcf5ee328e228d5a536b4de2069a79234f9f3e9e</id>
<content type='text'>
This is both simpler in client code and more effective (always reuse
block hottest in cache)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is both simpler in client code and more effective (always reuse
block hottest in cache)
</pre>
</div>
</content>
</entry>
<entry>
<title>perf(api): allow to use an arena for return values</title>
<updated>2022-08-23T16:34:24+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-08-23T07:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=c0d60526541a3cf977ae623471ae4a347b492af1'/>
<id>c0d60526541a3cf977ae623471ae4a347b492af1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: fix clang and PVS warnings (#19532)</title>
<updated>2022-07-27T22:05:33+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-07-27T22:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e0c433833f638fc5e21b00d298661a5fa7c4b5be'/>
<id>e0c433833f638fc5e21b00d298661a5fa7c4b5be</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>perf(ui): unpack grid_line (screen contents) directly</title>
<updated>2022-07-19T10:38:37+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-06-29T20:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=0b63f5afad852d077bb430ad9c9ba4301980d500'/>
<id>0b63f5afad852d077bb430ad9c9ba4301980d500</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>perf(ui): unpack a single ui event at a time, instead of a "redraw" batch</title>
<updated>2022-07-18T12:08:44+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-06-16T17:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=67a04fe6cb0f6b0cd3d44ae37b7caddddda198ea'/>
<id>67a04fe6cb0f6b0cd3d44ae37b7caddddda198ea</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(jobs): deadlock in channel.c:exit_event #19082</title>
<updated>2022-07-02T16:14:08+00:00</updated>
<author>
<name>erw7</name>
<email>erw7.github@gmail.com</email>
</author>
<published>2022-07-02T16:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e11f3655fb3bbedc29e496db26a25e6c83d25baf'/>
<id>e11f3655fb3bbedc29e496db26a25e6c83d25baf</id>
<content type='text'>
In the rare case that exit_event is called from process_close_handles,
it stalls waiting for the process to exit (the routine is currently
underway to do just that). This causes `job_spec.lua` to sometimes
stall.

REJECTED IDEAS:
==============================================================
1. Currently `exit_event` is placed on `main_loop.fast_events`. Would the problem
   be solved by using `main_loop.events` instead?
    - A: Maybe, but it will cause other problems, such as queuing exit_event()
      during "Press Enter..." prompt which may result in the event not being
      processed, leading to another stall.
2. Can we avoid the timer?
    - A: Using a timer is just the easiest way to queue a delayed event without
      causing an infinite loop in the queue currently being processed.
3. Can we avoid the new `exit_need_delay` global...
    1. by using `process_is_tearing_down` instead?
        - A: Can't use `process_is_tearing_down` because its semantics are different.
    2. by checking a similar condition as `process_teardown`? https://github.com/neovim/neovim/blob/f50135a32e11c535e1dc3a8e9460c5b4e640ee86/src/nvim/event/process.c#L141-L142
       ```
       if (!process_is_tearing_down || (kl_empty(main_loop.children) &amp;&amp; multiqueue_empty(main_loop.events))) {
         uv_timer_start(&amp;main_loop.exit_delay_timer, exit_delay_cb, 0, 0);
         return;
       }
       ```
        - A: Tried but it did not work (other stalls occurred). Maybe
          exit_event() is called from a source other than
          process_close_handles() and is delayed, the delayed exit_event() will
          be executed before main_loop.events is processed, resulting in an
          infinite loop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the rare case that exit_event is called from process_close_handles,
it stalls waiting for the process to exit (the routine is currently
underway to do just that). This causes `job_spec.lua` to sometimes
stall.

REJECTED IDEAS:
==============================================================
1. Currently `exit_event` is placed on `main_loop.fast_events`. Would the problem
   be solved by using `main_loop.events` instead?
    - A: Maybe, but it will cause other problems, such as queuing exit_event()
      during "Press Enter..." prompt which may result in the event not being
      processed, leading to another stall.
2. Can we avoid the timer?
    - A: Using a timer is just the easiest way to queue a delayed event without
      causing an infinite loop in the queue currently being processed.
3. Can we avoid the new `exit_need_delay` global...
    1. by using `process_is_tearing_down` instead?
        - A: Can't use `process_is_tearing_down` because its semantics are different.
    2. by checking a similar condition as `process_teardown`? https://github.com/neovim/neovim/blob/f50135a32e11c535e1dc3a8e9460c5b4e640ee86/src/nvim/event/process.c#L141-L142
       ```
       if (!process_is_tearing_down || (kl_empty(main_loop.children) &amp;&amp; multiqueue_empty(main_loop.events))) {
         uv_timer_start(&amp;main_loop.exit_delay_timer, exit_delay_cb, 0, 0);
         return;
       }
       ```
        - A: Tried but it did not work (other stalls occurred). Maybe
          exit_event() is called from a source other than
          process_close_handles() and is delayed, the delayed exit_event() will
          be executed before main_loop.events is processed, resulting in an
          infinite loop.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: stdpath('run'), /tmp/nvim.user/ #18993</title>
<updated>2022-06-30T11:16:46+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2022-06-30T11:16:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=f50135a32e11c535e1dc3a8e9460c5b4e640ee86'/>
<id>f50135a32e11c535e1dc3a8e9460c5b4e640ee86</id>
<content type='text'>
Problem:
- Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG
  spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which
  implies that XDG_STATE_DIR is potentially non-local.
- Not easy to inspect Nvim-created temp files (for debugging etc).

Solution:
- Store sockets in stdpath('run') ($XDG_RUNTIME_DIR).
- Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims.
- Make ok() actually useful.
- Introduce assert_nolog().

closes #3517
closes #17093</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
- Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG
  spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which
  implies that XDG_STATE_DIR is potentially non-local.
- Not easy to inspect Nvim-created temp files (for debugging etc).

Solution:
- Store sockets in stdpath('run') ($XDG_RUNTIME_DIR).
- Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims.
- Make ok() actually useful.
- Introduce assert_nolog().

closes #3517
closes #17093</pre>
</div>
</content>
</entry>
<entry>
<title>perf(ui): reduce allocation overhead when encoding "redraw" events</title>
<updated>2022-06-20T10:44:56+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-06-08T20:02:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=5d6987210578f5f1c3151988b99a9411f9603374'/>
<id>5d6987210578f5f1c3151988b99a9411f9603374</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
