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

Raw encoded file is causing lag with syntax highlighting enabled #1342

Open
DudeThatsErin opened this issue Mar 12, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@DudeThatsErin
Copy link

DudeThatsErin commented Mar 12, 2024

Plugin information (please complete the following information):

  • OS: Windows 11
  • Templater version: 2.2.3
  • Obsidian version: 1.5.10
  • Templater settings:
    Template Folder: 00-Templates
    Scripts Folder: 00-assets/scripts
    Everything else is basic.

Describe the bug
When I have templater enabled, without even using it, it causes my Obsidian Vault to lag on my PC.

Expected behavior
No lag with the plugin enabled. I tested on the sandbox vault and no lag. But on my vault with this enabled it lags.

It lags specifically with this file:
IGN Information.md

If I import that file into my Sandbox vault with the templater plugin, my vault (entire vault, not just this file) lags.

Screenshots
I had to upload the gif to my icloud.
https://www.icloud.com/iclouddrive/06cKpRYz5dQjCNtUOeJ66AQIg#Obsidian%5FlDNOjeYQmi

@DudeThatsErin DudeThatsErin added the bug Something isn't working label Mar 12, 2024
@DudeThatsErin
Copy link
Author

For some reason having raw encoded files is what causes the lag.

@Zachatoo
Copy link
Collaborator

Do you have an example of a raw encoded file I could test with?

@Zachatoo Zachatoo changed the title Templater is causing lag in the latest insider release v1.5.10 Raw encoded file is causing lag in the latest insider release v1.5.10 Mar 13, 2024
@DudeThatsErin
Copy link
Author

I uploaded it in my OP

@Zachatoo
Copy link
Collaborator

Thanks, can reproduce!

It's from the syntax highlighting, seems like it's having a hard time parsing the file to decide how to apply syntax highlighting.

For now, you can turn off syntax highlighting in Templater settings and performance returns to normal. I may need to look into rewriting that code.

@Zachatoo Zachatoo changed the title Raw encoded file is causing lag in the latest insider release v1.5.10 Raw encoded file is causing lag with syntax highlighting enabled Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants