Hey,
I use Vim Mode for Obsidian. Because I like to move fast, I have increased the key repeat frequency (the number of times a key is repeated when I hold a key down). This makes Obsidian laggy. Instead of Scrolling fast, the cursor jumps, the moment I let go. This is very irritating.
Steps to reproduce
Increase key repeat speed. And move around with j/k in vim mode.
Expected result
Expect normal scrolling behavior.
Actual result
Cursor is jumpy. Also see video:
The framerate is a bit low, so it still seems jumpy after lowering key repeat speed. But in the first case, key repeat speed is high and jumpyness is apparent, after I lower it, movement is smooth.
Environment
Operating system:
Running on Linux (PopOs). Happens both in Appimage and im Flatpak.
Debug info:
SYSTEM INFO:
Obsidian version: v1.0.3
Installer version: v1.0.3
Operating system: #202210211149~1666452039~22.04~1891946 SMP PREEMPT_DYNAMIC Sat O 6.0.3-76060003-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
Hey, good call: This is actually not a vim only problem. (1) Could reproduce in the sandbox mode with vim turned off and just using the arrow keys. Should I update the text/title? And yes (2) this also happens in source mode. It does not happen in (3) and (4).
Hey, it is not a Chrome problem. It works just fine at the link you provided. Also, no problems in VS Code or really any other app.
Ok, sad to hear. I can imagine, that most people won’t make the connection to the high key repeat speed. For a time, I though Obsidian was just suddenly super slow and buggy. So this might be a thing to point out if somebody reports performance issues. I guess the default key repeat speed also isn’t the same everywhere.
Since you are able to reproduce this problem in the sandbox vault, can you provide a performance profile?
Ctrl-shift-I/Cmd-opt-i → performance tab → record button → do the action that lags → wait → stop recording → export to file → zip it and upload it here or DM to us on discord
If it happens in source mode, send a performance profile of that too.
I have this problem too; going up and down sometimes it can take 7-8 seconds from when I release the key for the screen to update. The lag gets noticeably worse the more panes are open. With only one pane up and down lag, but left and right work okay. With three panes open left and right also lag noticeably. There is also a big spike in cpu usage whenever a key is held down, whether there is visible lag or not.
Here are four profiles I recorded, with only one pane open, and with three panes open. All files either in preview mode or in source mode. Test vault, only vim enabled. No other applications running.
My system specs:
Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.14.21-150400.24.33-default (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700T CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 530
SYSTEM INFO:
Obsidian version: v1.0.3
Installer version: v0.15.9
Operating system: #1 SMP PREEMPT_DYNAMIC Fri Nov 4 13:55:06 UTC 2022 (76cfe60) 5.14.21-150400.24.33-default
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
I’ve got the same problem, with significant lag moving the cursor up and down, and no noticeable lag moving the cursor left to right. The cursor will disappear when I hold j/k/up/down until these keys are released, at which point the cursor will reappear. Not quite the 7-8 second lag reported by tprotopopescu, but similar to bobsenrie’s video.
I usually have my key repeat rate set to 80Hz. I find that the lag doesn’t disappear until I lower the repeat rate to around 20Hz, which is much slower than I would like.
I’ve attached a performance profile for a bare vault.
My CPU is i5-8250U @ 1.60GHz.
This is also running Manjaro Linux, if that is significant.
Hope this helps!
I have the same problem, but I’m unsure if it’s only due to repeated keys. The repeated key always creates a lag if I do it for enough long (forcing it), but more than often, it happens during my daily writing and is so distracting as the lag is a couple of seconds. Below a screenshot:
UPDATE (27th August): I have deleted lots of Plugins, especially old ones and also new ones I just installed, like Lazy loading with BRAT. Although the lag was also there with restricted mode, I can now confirm the lag is gone. Also on another note, I think I tested always with the Developer Tools open too see what happens, I think that in itself produced a lag (obviously the initial lag was not due to it, but my debugging was mostly done with that open).
I can’t point it to one specific Plugin, but it might have been that lazy loading could have been too new, or also did something with plugins that were started delayed. But that’s just a guess. For now, I have not installed it.