-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Severe performance issues with Obsidian 1.7.4 #602
Comments
Unfortunately, I am not able to reproduce this. Do you maybe have a minimal reproduction example? Maybe some smaller notes that I can use to reproduce the issue? |
I just created a test vault and found this after some tinkering: Maybe you can reproduce this when you set your Vault settings like this: (Sidenote: Once you do this, this issue is back: #445. It appears fixed when the setting is set to the default "shortest path possible".) |
reporduced for me same way, it is not possible normally edit note when Toggle icons for links is enabled. Any symbol change delays for 1 sec. |
This has been a HUGE problem for me as well: A longer note (1000 words+) with lots of links and/or headings with icons will result in major slowdown when typing (i.e. imputing new characters with the keyboard). Scrolling with the wheel or changing tabs has no slowdown whatsoever though. All in all, the "typing lag" will manifest itself more the more icons there are (which WILL happen as you add more text)... To the point typing just becomes unbearably sluggish and irresponsive (some keys actually not even registering and not showing up in the screen) and you just have to deactivate Iconize. Deactivating Iconize instantly solves the "typing lag" problem, so it is pretty clear this plugin is the problem.
|
I was able to reproduce this issue, with notes very small, you only need to have duplicate several times some link with icons, and as the note have more and more of those icons, the page becomes very slow, for every icon, it becomes even slower. |
After several tests, i've tried several older versions of Obsidian and all of them the performance issue was still present, tried disabled all icons, left only the custom ones and the slow was still going. After several trials, i've disabled my Theme (currently using "Border" theme from store) and my issue was related with my theme in the end. Gonna try identify what's the issue with this teme and if identify something i get back here (: |
Ok, just found out that im my case - theme "Border" were responsible for the perf issue, few classes was causing the problem:
Not really sure what they're customizing, but i think while were typing those divs are updating and making a lot of calculations because of animation property. Don't know if other users have the same issue as i, but a easy way to identify is try to disable the theme and see if generate any impact on the perf typing with icons configured. While updating CSS i've had to reload obsidian window to update CSS changes and see if the perf issues was solved while i was disabling some CSS snippets. Update:
But I couldn't confirm. Sometimes it slows down with those applied, sometimes not. For sure, it's going to leave without them. After more fewer tests, adding several icons (over 50) to the same page, the typing became slower even with themes disabled Tests made on Macbook M3 |
I have the same issue since Obsidian 1.7.x in a large note with dozens of links. I was not having issues with the same note prior to Obsidian 1.7.x. I am attaching a performance trace which clearly shows all the time is being spent recalculating styles, just as @LandonSchropp mentioned: Trace-20241113T173428.json. The trace points to this piece of code as the trigger for an expensive forced reflow on every keypress: obsidian-iconize/src/lib/util/text.ts Line 3 in 14da152
|
Describe the bug
Since Obsidian updated to 1.7 a few days ago, i'm getting severe lag when typing. I've identified the culprit to be Iconize, and more precisely, when "toggle icons in links" is set to on.
When editing a note that has at least one linked file (which also shows an icon), typing has a serious delay. As soon as i disable all community plugins including Iconize, typing is practically instant. But once Iconize is present again (even if it's the only active community plugin), the input lag is back.
Expected behavior
Typing should be instantaneous.
Console Infos
Here's the console output from the Developer Console:
I click anywhere in a note:
[Violation] Forced reflow while executing JavaScript took 33ms
I type "asd":
[Violation] Forced reflow while executing JavaScript took 78ms
[Violation] Forced reflow while executing JavaScript took 72ms
[Violation] Forced reflow while executing JavaScript took 68ms
I wait and type "asd" again:
[Violation] Forced reflow while executing JavaScript took 85ms
[Violation] Forced reflow while executing JavaScript took 75ms
[Violation] Forced reflow while executing JavaScript took 68ms
I type SHIFT-POS1:
[Violation] Forced reflow while executing JavaScript took 53ms
I hit DELETE:
[Violation] Forced reflow while executing JavaScript took 117ms
I keep my finger on any button go get something like "aaaaaaaaaaaaaaaaaaaaaaa":
[Violation] Forced reflow while executing JavaScript took 85ms
[Violation] Forced reflow while executing JavaScript took 215ms
[Violation] Forced reflow while executing JavaScript took 549ms
[Violation] Forced reflow while executing JavaScript took 692ms
(Obsidian takes a good full second until it shows me "aaaaaaaaaaaaaaaaaaaaaaa")
… and so on.
Additional context
The text was updated successfully, but these errors were encountered: