Occasional noticeable input lag when typing

(I’m really hesitant to make this topic – this is my third attempt in as many days – because it’s so hard to replicate or measure the following. I make this topic primarily to get help, not to blame, because the behaviour described below is annoying to me.)

Steps to reproduce

When I type in a note, I every now and then experience lag (every 20 seconds or so). This is a noticeable lag (where I pressed the 2nd or 3rd key and the first hasn’t shown yet). I guess it to be one or two seconds.

On Obsidian 0.9.22, the CPU never goes below 10% as long as I type. It frequently spikes to 40% when I’m typing in a note (without me doing something ‘special’ like searching, creating a note, or even switching to a different note). Those spikes seem to coincidence with the lag I experience.

I have:

  • Spell check disabled.
  • No Markdown preview panel open for the same file I work on.
  • No editor panel open for the same file I work on.
  • No MathJax or tables in my notes.
  • No block references or code (iframe) in my notes.

I could not connect this behaviour to specific notes.

I think this behaviour started around 0.9.18 or 0.9.19. I’m not entirely sure due to the frequent releases during that time.

Expected result

I would expect a relatively smooth typing experience.

Actual result

A noticeable input lag every now and then. This latter seems to coincidence with the CPU spikes.

Environment

  • Operating system: Windows 7 64-bit
  • Obsidian version: 0.9.22

Additional information

I have these plugins enabled:

  • File explorer
  • Search
  • Quick switcher
  • Backlinks
  • Starred
  • Command palette
  • Daily notes
  • Random note
  • Sync

(I have no third-party plugins active.)

Sounds like it’s doing something when it’s saving. Could you take a performance recording using the developer tools? Once that’s done, export the profile json file and put it into a .zip, then send it to me privately (preferably via DM on Discord).

I send the file through Discord. Thanks for your consideration. :slightly_smiling_face:

Licat’s analized your vault and it gave us ideas for further optimizations.

Thanks for the update, that is good news. :slightly_smiling_face: Let me know if I can help in some way.

we will introduce a structural change in 0.10.12 that could positively affect your issue

1 Like

Thanks for the update and thanks for the good news. I’ll look forward to it. :slightly_smiling_face: