oni icon indicating copy to clipboard operation
oni copied to clipboard

Oni is very slow

Open danielo515 opened this issue 6 years ago • 6 comments

Oni Version: 0.3.9 Neovim Version (Linux only): Operating System: OSX

Issue: Oni is very slow

Not sure what is the problem from the very beginning Oni has felt slow, very slow. My machine is a macbook pro with an i9 and 32GB of ram, so I don't think it is a power problem. This problem is particularly noticeable when navigating files (as reported on another issue) but in general every operation in oni is slow: deleting lines, moving the cursor, changing words... all the tasks related to edition. It is curious that the rest of the tasks does not feel as slow, for example the sneak mode is snappy and responsive, opening a file feels fast... is just that trying to edit any kind of file (json, js, ts) feels very slow.

This editor is very attractive, but with this level of slowness it quite unusable. Regards

danielo515 avatar Feb 24 '19 15:02 danielo515

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot[bot] avatar Feb 24 '19 15:02 oni-bot[bot]

The team have started working on a Oni 2, which is a rewrite as a native client.

tom-james-watson avatar Feb 27 '19 09:02 tom-james-watson

Oh yes, and I tried it @tom-james-watson But after installing all deps, compiling and all that stuff all what I get is a plain text input, nothing else. So my impression is that it is very far from being usable, and of course ever farther from being a replacement to current Oni. On the other hand, I have some other electron based editors (vscode, atom) and none of them is as slow as Oni is right now.

Regards

danielo515 avatar Feb 27 '19 13:02 danielo515

I wish to say that specifically doing vimgrep is really slow. Doing verbose=15 I noticed that there is this line , written once:

Executing BufReadPost Auto commands for "*" autocommand :call OniNotifyWithBuffers("BufRead")

That function gets called for every file, and it seems to be slow

line 1: return bufexists(a:i) && buflisted(a:i) && "quickfix" !=? getbufvar(a:i, "&buftype") function OniNotifyWithBuffers[3]..OniGetAllBuffers[2]..User_buffers[1]..<SNR>84_filter_buffer returning #0 Indeed , it was around 5X-7X slower than the same search in neovim.

eyalk5 avatar Mar 14 '19 00:03 eyalk5

Mitigation for vimgrep :

function! Matches2(a)
	:set eventignore=all
         execute ":vimgrep " . '/'.a:a . "/j **/*"  
	:set eventignore=
        :copen
endfunction```

eyalk5 avatar Apr 24 '19 23:04 eyalk5

Another thing that really helped me out, was adding "ui.animations.enabled": false, to the config file. It really makes a difference. Also, check if you have a big workspace with nested folders with lots of files (like node_modules). I also added this to the config file: "oni.exclude": ["**/node_modules/**", ".git", "**/build/**"],

josemiguelo avatar May 25 '19 19:05 josemiguelo