Live Preview causes obsidian to use 30-40% CPU when idle

Steps to reproduce

Start Obsidian after updating to the version that has Live Preview on by default
Wait a few minutes to reach steady state
Observe CPU usage in top

Expected result

As before, 0-5% CPU usage when not using it

Actual result

30-40% of CPU usage, continuously.

Environment

  • Operating system: Linux
  • Obsidian version: 0.13.8

Additional information

2 Likes

I can’t reproduce this. Post a screen recording of this happening in the help vault.

It’s actually happened to me:

image

The issue occurred exactly like @thomasvs described his issue (although I’m running macOS and Obsidian v0.13.10), but…

Weirdly enough, the problem is currently gone after I did this:

  1. Opened the Help vault
  2. Closed all other vaults.
  3. Re-opened the regular vaults.
  4. Closed the Help vault.

I’ll shout if this recurs.

1 Like

The issue occurs to me although the steady state CPU usage is not as high as @thomasvs (about 20%).

To reproduce this,

  1. open several notes in the preview mode.
  2. reload without saving.
  3. wait to the steady state.

I found a way to lower the high CPU usage:

  1. do the same as above.
  2. toggle the editing mode and toggle the preview mode again.

Then the CPU usage becomes lower from the steady state.
Here is a screen recording ↓.
https://drive.google.com/file/d/1XjyfGAu9LHZAV2jWW-fiFR2qodg_trW1/view?usp=sharing

My environment is as follows:

  • MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports), Version 12.1
  • Obsidian v0.13.19

Update obsidian. Please, Post a screen recording of this happening in the help vault.

I updated v0.13.23, and now the problem seems to have been solved.
The CPU usage is no longer so high.
Thank you @WhiteNoise!

1 Like

I’m reporting this because it seems to be related to this topic.
I’d like to know whether it is a bug or a normal behavior.

When I open files in new panes, functions like t.queueRender are called many times even after I close the panes.
Here are the results on Performance tab in devtools.

Before opening files

After opening files in new panes

After opening files in an existing pane

Here is my environment ↓.

SYSTEM INFO:
Obsidian version: v0.13.23
Installer version: v0.13.23
Operating system: Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 21.2.0
Login status: not logged in
Insider build toggle: off
Live preview: off
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 0
Safe mode: off
Plugins installed: 13
Plugins enabled: 0

RECOMMENDATIONS:
none

1 Like