daa84 / neovim-lib

Rust library for Neovim clients
GNU Lesser General Public License v3.0
192 stars 26 forks source link

Consider adding buffered reading #15

Closed KillTheMule closed 6 years ago

KillTheMule commented 6 years ago

Heyho!

Would you consider buffered reading, or the option to have buffered reading to the lib? It can speed up the communication with neovim (probably a bottleneck for many applications... at least it is this way for my plugin for sure) greatly! Simply wrapping the reader in the communication thread in a BufReader reduced the time of the relevant benchmark of my plugin by 70%!

So would you consider that? If it proves troublesome, maybe a compile time option?

daa84 commented 6 years ago

Hm, yes, this is really need to do thing :+1: . Maybe also together with BufWriter.

KillTheMule commented 6 years ago

Why don't I get notifications on commits on repositories I'm watching -.- Anyways, thanks for adding that.