Note with many underscores cause reading mode to be slow, indexing is taking a long time, high CPU usage

Steps to reproduce

  1. Create a new vault.
  2. Create a new note in the vault.
  3. Copy & Paste this pastebin into the newly created note: organization_id, user_idorganization_id, user_idorganization_id, user_idor - Pastebin.com

Expected result

CPU usage stays low, or high but only for a short amount of time.

Actual result

One CPU core is fully utilized for at least one minute when the content is pasted and later when any modification is made to the content.

Environment

  • Operating system: Linux
  • Obsidian version: 0.9.20

Additional information

It also happens when a vault containing such file is opened.

1 Like

I think that’s because Obsidian is searching for links in this file, but I’m not 100% sure about that.

I can confirm that this also happens on Windows with Obsidian 0.9.22. The user interface does not freeze, but there’s high CPU usage nonetheless right after pasting the file:

It took just over 3 minutes before the 25% CPU load came back to 0. During that time I did nothing else with Obsidian. After that I quickly deleted the file for fear of crashing Obsidian. :laughing:

(I used the example file provided by @monyxie for this test).

Thanks we’ll look into this

The slowdown happens because the markdown processor (remark) gets bogged down by the many _.

We’ll double check this again when we update to next major version of remark.js

1 Like

Can this be fixed? It seems to still be a problem after 3 years