vim-parinfer icon indicating copy to clipboard operation
vim-parinfer copied to clipboard

Very slow to update for long s-exprs

Open metasoarous opened this issue 7 years ago • 6 comments

98% of the time, vim-parinfer works great for me, but for code with very long top level forms (long defrecords for instance), it tends to be pretty horrible (well nigh unusable, sometimes forcing me to switch to Cursive). Other parinfer-capable editors I've used don't seem to have this problem, so I'm assuming the issue isn't inherent to the algorithm, but instead the implementation.

Is there a chance #35 might help us here?

metasoarous avatar Dec 29 '17 23:12 metasoarous

@metasoarous yea, noticing the same thing. The VimL implementation is very very slow, so I think https://github.com/bhurlow/vim-parinfer/issues/35 would probably be a big improvement

bhurlow avatar Dec 29 '17 23:12 bhurlow

In the first release I actually sent the buffer over the wire to a node.js server running the parinfer js lib and that was also considerably quicker

bhurlow avatar Dec 29 '17 23:12 bhurlow

@metasoarous are you using neovim or regular vim?

bhurlow avatar Dec 29 '17 23:12 bhurlow

Regular vim.

metasoarous avatar Dec 29 '17 23:12 metasoarous

Hi! I ported parinfer to Rust, which Vim can call through libcall(). It's much faster, doesn't require Neovim, and can probably be improved, speed-wise. It might be beta quality, though.

See here: https://github.com/eraserhd/parinfer-rust

eraserhd avatar Mar 14 '18 17:03 eraserhd

@eraserhd can't wait to try it

bhurlow avatar Mar 14 '18 17:03 bhurlow