Typing is laggy in 0.9.15

After updating to the latest version 0.9.15 I’ve noticed that typing is significantly laggy for me. Each keystroke about 0.5 second delayed from when the key is pressed and the character rendering. I’ve tested this in other text editors on my machine to make sure it’s not something else on my system, but the problem is unique to Obsidian.

Is this unique to me? Anything I can provide to help you diagnose?

1 Like

does this happen with default css and no third-party plugins?

Also please use the template when reporting bugs

I had the same idea that the typing experience is a little less smooth, but I don’t know if it’s 0.5 seconds. I also have no way of proving or measuring this. But you’re not the only one with this idea.

Hi,

Thanks for the quick response. I am using the default CSS and no third-party plugins. I have only a single (rather simple) document open, and this seems to happen equally with all of my files.

I’m noticing other aspects of the UI are laggy too. I restarted my computer to see if that would make it faster, in case it was something stuck in memory. It definitely is better after a restart, but you can still see the sluggishness demonstrated here. It can be significantly slower than this after typing for 10-15 min.

I can take another screencast if I see if performing worse than this again.

Running MacOS 11.0.1 in case this is perhaps related to the recent OS release.

(Sorry about not using the template. I’m new to posting to the forum to share this and wasn’t aware of a specific template to use)

I am not really conviced I see anything too much out of the ordinary.

  • How many files and how large are the files in your vault?

  • What are your computer specs?

Yes, I can clearly see the lag. You can see entire words or portions of words updating suddenly, rather than single letters updating as you are typing. That is not ordinary.

I would very much suspect this being a Mac Big Sur issue. You are extremely brave to have upgraded so quickly!

1 Like

Brave indeed! I’m a software developer, and so I’m on a Big Sur machine used for testing our own apps. Now on stable release, not beta, but yes… I’m brave! haha. Maybe this can help improve the system for others as they upgrade.

(1 year old MacBookPro, 2.9Ghz Quad, 16 GB Ram – one of the better MBP’s you could buy at the time)

I did some poking around and noticed that Obsidian was using an enormous amount of RAM in my Application Monitor (2.2gb). That seemed odd to me. I quit the application and restarted it, and it instantly jumped up to the same memory usage.

I went spelunking a bit, and found that in my ~/Library/Application Support/obsidian/ObsidianCache directory were 3 json files. One looks to be application configuration, and 2 for each of my vaults. The json file for one of my vaults was just over 2gb in itself. (The actual vault content folder is only 1.7mb, 839 .md files, so this seems really odd).

I loaded up the json file in VIM and it appears to be the issue. This is the json file that corresponds to the vault in my screencast. It looks like somewhere something got stuck in an infinite loop and kept writing the same record for file “$ The Pyramid Principle.md” over and over and over until the file ends mid stream.

I’m not sure how I got into this state.

Either way, I quit Obsidian. Deleted that JSON file. Reopened that vault and saved a change. That regenerated the cache file, and it appears to be fine now (32kb). The laggyness appears to be fixed, it’s as snappy as it was a few weeks ago.

If I had to speculate, I’d say maybe Obsidian was chugging along trying to read that enormous JSON file, or perhaps whatever library was used to read the JSON file was struggling with it being invalid and at that size.

Consider my issue fixed, but I hope maybe my experience is helpful for the future.

3 Likes

thank you very much this is actuall very helpful. Let us know if this happens again.

If this happens again, it would be great if you can send a snippet of what it looks like in the JSON file, which will help us greatly with identifying what could have possible went wrong.

Thanks!