LilaRest / obsidian-custom-classes

A minimal Obsidian plugin that allows you to add your own HTML classes to chosen Markdown elements directly from your notes.
MIT License
73 stars 3 forks source link

Plugin causes immense slowdowns #12

Open PrinceHeadache opened 1 year ago

PrinceHeadache commented 1 year ago

Hi!

I encountered a bug with this plugin where it causes a huge slowdown across the entire program. The issue could be fixed with a refresh but would return in a matter of minutes. The issue could also be induced immediately upon the use of code blocks.

To Reproduce Steps to reproduce the behavior:

The slowdown happened seemingly at random, but there was also a way to induce the slowdown.

Code blocks, for some reason, immediately made the program move at a crawl, and the only fix was removing the block from the note. Performance was this slow in notes, in the native menus, etc. while this issue was in effect.

Please see the video I recorded below for an example of this behavior being induced by code blocks.

The "random" slowdown I mentioned earlier only seemed to be solved by a restart of Obsidian, although it was only a temporary fix. I tried diagnosing if there was a pattern in my behavior that could be causing it, but I didn't notice anything. Reproducing that scenario remains a mystery to me at the time of writing.

Expected behavior Expected behavior would be not having the slowdown be an issue at all, and being able to use code blocks freely.

Screenshots

https://user-images.githubusercontent.com/126889088/226410722-dd0f158b-3c7a-4b44-9831-8af7bf6b63f6.mp4

Device (please complete the following information):

Additional context Thanks for your help! Love this plugin so I'm hoping this doesn't mean the end of it for me. If you need any more information from me I'd be happy to provide it.

LilaRest commented 1 year ago

Hi @PrinceHeadache ! Thanks for reporting that issue, and sorry for the late reply ^^ Unfortunately I'm not maintaining this project anymore. But feel free to PR if you wanted to fix this by yourself :)