Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Obsidian "freeze" if editing YAML Front Matter in source mode and Front Matter complements is enabled with large tables #324

Open
esodesod opened this issue Nov 27, 2024 · 1 comment
Assignees

Comments

@esodesod
Copy link

First; really love this plugins; so thanks a lot for making it!

Today, I noticed a major freeze in Obsidian, while trying to edit YAML Front Matter in source mode, while using Various Complements 10.0.3 and have enabled "Front matter complement", in the settings (with defaults). I think I narrowed it down to a really large table (with a lot of spaces) in the content/body, but I don't know why this affects editing YAML Front Matter (in source mode).

How to reproduce

  • Open sandbox vault
  • Import the attached Markdown file (2024-11-27-various-complements-1003-freeze-yaml-front-matter.md)
  • Install and enable Various Complements v10.0.3
  • Enable Front matter complement (with defaults).
  • Open the attached file
  • Switch from live preview to source mode (for the whole file, including YAML Front Matter as source mode)
  • Select some random text in the YAML Front Matter section
  • Freeze/lag occurs.

In Developer Tools > Console, something like this is also logged:

[Violation] 'setTimeout' handler took 3993ms

Note

I guess it has something to do with really large table (with spaces) in this file, as if the long line (with <br>) is removed, and trimmed down, issue does not occur. If I disable front matter complement, the issue/freeze/lag does not occur.

SYSTEM INFO:

Obsidian version: v1.7.7
Installer version: v1.7.7
Operating system: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000 24.1.0
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Various Complements v10.0.3

Attachments

2024-11-27-various-complements-1003-freeze-yaml-front-matter.md

@tadashi-aikawa
Copy link
Owner

@esodesod
Thank you for the detailed report.

Front matter complements are designed to fill in incomplete front matter by analyzing it every time the document is updated, so that is likely the cause. I'll try to reproduce the issue when I have time. 👍

@tadashi-aikawa tadashi-aikawa self-assigned this Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants