onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.34k stars 299 forks source link

Performance: improve performance of interface-heavy events #174

Open metalelf0 opened 7 years ago

metalelf0 commented 7 years ago

The new update (0.1.8) significantly improved performances, making oni really usable as a daily driver, but some "interface heavy" events (like window resizing, or search-as-you-type in FZF.vim) still feel really slow compared to terminal neovim and neovim-qt. Thanks!

bryphe commented 7 years ago

Yeah, totally, we need to fix some of those performance issues still. Thanks for the report!

There are a few potential bottlenecks I saw in my last round of profiling: 1) Need to add incremental render checks (sometimes we update the elements too aggressively, even if they haven't changed) 2) Scrolling needs to be optimized via #88 3) In some cases, the it looks like the traversal of data we get via msgpack-rpc can be the bottleneck - need to investigate that further

bryphe commented 7 years ago

Integrating the LiveUpdate will significantly help performance: https://github.com/neovim/neovim/pull/5269

A major drain on performance is the processing of our msgpack messages, and in the case of buffer updates, we are sending the entire buffer in most normal-mode cases.

benjamin-rood commented 7 years ago

I'm getting some (tolerable) keyboard input lag on very big files from this issue in Oni, and monstrously large input lag in VS Code using the VSCodeVim extension. Hopefully the LiveUpdate PR will help with that too.

bryphe commented 7 years ago

@benjamin-rood - thanks for letting us know! Yes, the LiveUpdate should offer big performance improvements for us... especially in cases when we are sending the whole buffer over (like, any normal mode operation).

Just a couple of questions:

In addition, are you seeing any lag on small files?

Want to make sure I'm capturing everything in my profiling.