I spent too much time today chasing a keyboard lag problem in Obsidian. It is the tool I rely on the most at work, handling tasks and notes. Starting Thursday, and continuing today, everything I typed or selected lagged to the point of total annoyance, and the laptop fan was in constant use. My muscle memory is strong and when I took action but couldn’t see anything happen, I got frustrated.

When I typed CPU use jump from 5–6% and 40%+.

Searching turned up a number of suggestions. None worked for me.

  • Disable all plugins—perhaps one of those had updated and was causing issues
  • Turn off themes—possibly a theme was too taxing with CSS styling
  • Disable hardware acceleration—yep, apparently that works for some as paradoxical as it seems
  • Reinstalled Obsidian—in case the underlying Electron back-end was out of whack

It wasn’t until I opened the Sandbox vault that I got a real clue. The sandbox experienced no problems at all. It was enough to take the attention away from Obsidian and point towards OneDrive. Sometime last week I had experienced undue delays in OneDrive. A PDF saved to my OneDrive account online from Word took 10+ minutes to show up in File Explorer. I’ve seen similar before but didn’t connect it to Obsidian’s typing lag.

To avoid data loss, Obsidian saves files very frequently. Multiple times per line of text seems to be my experience. It is normally unnoticeable. But with OneDrive doing whatever it was doing, the file system must have been locking somehow and feeding back into Obsidian. The sandbox, which was outside of OneDrive was fine.

I’m prevented from using Obsidian Sync at work to keep a copy of my vault and that is fine. Instead I stored my vault in OneDrive to always have a backup if I needed to recover a file’s contents. I have to give that up for speed.

My Obsidian vault now lives outside of OneDrive and keeps up with my fastest typing.