jfpedroza / neotest-elixir

Neotest adapter for Elixir
MIT License
41 stars 10 forks source link

use :delayed_write option to reduce number of event triggers #8

Closed ajayvigneshk closed 2 years ago

ajayvigneshk commented 2 years ago

Currently each write is flushed, and so the number of result events triggered are numerous. This affects the responsivenes of neovim greatly when running the entire test suite on large projects. Using the :delayed_write option (doc) improves this greatly. Obviously with streaming this will reduce the live update a bit, but it's not very noticeable IMO. The size and delay values are configurable. Sticking to default right now (as per docs it's 64kb, 2 seconds)

Before the change

Screenshot 2022-09-08 at 19 06 00

After the change

Screenshot 2022-09-08 at 19 04 53
jfpedroza commented 2 years ago

I agree, it's not necessary to trigger an update every single time a test finishes.

2 seconds seems a good default. If it starts bothering me, I'll just add an option to set the delay.