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

🐞 styles.css formatting makes some pages render very slowly #413

Open
3 of 7 tasks
Pachtjuilaard opened this issue May 5, 2024 · 0 comments
Open
3 of 7 tasks

Comments

@Pachtjuilaard
Copy link

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

My character sheet, containing a statblock, should load normally. A page with a dataview table containing 100 notes from my bestiary, with all pages containing a statblock, should load within the 8+ seconds it does now.

Current behaviour

Since a few updates of the plugin, my character sheet (containing a statblock for familiars) would run incredibly slowly, hang, and crash Obsidian. A dataview table with 100 monsters would also hang Obsidian for a bit.

Through checking console, running performance tests, checking all kinds of plugins, new vault, everything, I've found that the problem was resolved after deleting styles.css and reloading the vault.

When I download styles.css, it seems to be formatted without any newlines for the most part. When opening text files with loooong lines (making me scroll miles to the right in the text editor), it also takes a long time to open that file. Replacing all ";" with ";
" seems to have resolved the issue. Could you change the formatting of the css file to have newlines, instead of the first line of the file having 1407037 characters?

Disabling the Markdown Attributes plugin helps a tiny bit, but does not completely resolve the issue.

Reproduction

  1. Have the statblocks plugin installed.
  2. Check if styles.css has 1,000,000+ characters in the first line. If so,
  3. Make a new note and paste the dataview code below (or adapt it to fit your bestiary folder).
  4. See that the page takes a lot longer than usual to load, and see that Obsidian is unresponsive in the meantime.
table MonsterStats.challenge
from #monster/type/beast
sort MonsterStats.challenge desc
limit 100

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.15.12

Plugin Version

4.3.5

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

Formatting styles.css to have newlines after every ";" seems to resolve the issue.

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

1 participant