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: Performance issues when enabled #1456
Comments
does this happen on an empty page or a page that has already some text? If yes, can you share an example page? |
@TfTHacker is working on an update to SNW - which will be performance-oriented. Hopefully, that will resolve the issue. |
yes, it also happens on an empty page
yes, it also happens with only a single tap open |
Not sure if my issue is super related but I also have this issue but it is all of Obsidian that slows down, Doing anything has a slight delay to it. Disabling all plugins but Excalidraw still causes the slow down. |
looking for the needle in the haystack. (unfortunately) I do not experience performance issues... thus cannot replicate problems. True, Excalidraw installs a number of event handlers, but based on code profiling I don't see these consuming an obsessive amount of resources. @KingRecycle, Can you confirm, that you have disabled all other plugins, then restarted obsidian (to ensure plugins are properly offloaded - some plugins fail to clean up fully), and you experience a slowdown? Is this slowdown right after Obsidian starts, or even 5 minutes later (maybe Obsidian indexing is running in the background that is eating resources) Are you frequently changing theme or css styles? Do you experience a slowdown on an empty document? or a document full of drawings? |
@zsviczian If you slow it down to x0.25 you can see the "hitching". d5pxva.mp4 |
@KingRecycle, do you by any chance have "Display type for excalidraw.md files in file explorer" enabled? That will have a slight effect on File Explorer when you open or close it, but not at any other time. i.e. it should not affect typing, searching, or anything else - since it monitors the changes in the file explorer tree. Try turning that option off. What do you mean by panning the canvas? Which canvas? |
@zsviczian "Display type for excalidraw.md files in file explorer" option is disabled. It's like any Obsidian Canvas will drop to like 30fps or something. Here is a video of what happens. i525r7.mp4 |
@KingRecycle I may have found a solution. The strange thing is it has been there for minimum a year now... and nobody ever pointed it out. I am glad this came up, debugging this helped me identify a number of performance improvement opportunities. 🫰that you'll confirm the performance improvement... Hope to release this WE. |
@zsviczian Awesome! The typing issue from the OP I didn't really have or if it is an issue it's so minor I can't really notice it and it wasn't until I was thinking about reorganizing my folder structure that I noticed some hitching in opening folders which got me to test stuff like moving a canvas around. So I couldn't say for sure how long I've had the issue. Also I forgot to mention that I use the insider build but I did go rollback and check and I still get the slow down when Excalidraw is enabled. I've also changed my monitor to 60hz which makes the slow down less noticeable compared to when I set it to 144hz, so that might contribute to no one bringing up the issue. /shrug Thanks for your hard work! |
this has nothing to do with the insider build, but rather with code I built at the very beginning of the plugin 2+ years ago... code which was not very efficient. |
@zsviczian Alright. I'm just trying to cover my bases and give you as much information as possible. I know how troublesome debugging can be. :) Thanks! |
@KingRecycle can you test 2.0.4 to see if the performance has improved? |
@zsviczian It didn't so I did some more testing. It seems to be something with AnuPpuccin Theme that reduces the performance of Obsidian and when Excalidraw is enabled for some reason makes it much worse, but with the theme turned off and all my plugins turned on the performance is fine. Their latest update says "Removed Excalidraw support", not sure if that is related. |
I guess this is what "removing Excalidraw" support means: AnubisNekhet/AnuPpuccin@30b4da5 |
@SeLiEnisyst Do you use the Anuppuccin theme? Turning it off fixed my performance issues. |
@KingRecycle No, I use the Minimal Theme. Disabling the Minimal Theme, didn't solve the problem |
First of all, thank you for your incredible work zsviczian. Test with switching between two empty notes (one had one metadata field with two URLs; both had one H1 heading) at a steady rhythm for ~10 seconds. Hardware acceleration enabled, Ubuntu, latest Obsidian and Excalidraw. We can see that with the Minimal Theme + Excalidraw combo, we're getting 2 whole more seconds on rendering. Rendering is ~5 times slower for the Default theme with Excalidraw enabled, then without. Minimal theme + Excalidraw as the only plugin:Default theme + Excalidraw as the only plugin:Minimal theme + no plugins:Default theme + no plugins: |
I have found 2 main sources of slowdown, but still investigating.
Both of the above will likely collide with themes, because I assume they regularly update body with class tags or similar which in turn triggers a whole host of actions in Excalidraw. The good thing is I finally found a way to test all of this by throttling my CPU 6x. My next update will focus solely on improving performance. |
@piotrnajda3000, could you run the same test with this version? Can you also confirm if you also have legacy excalidraw files in your vault, and if yes, try the same in a vault without the legacy files. (Remove those and restart Obsidian) |
Hello @zsviczian, I've repeated my yesterday tests, this time fully relaunching Obsidian between each bullet point below. It's probable I didn't correctly restart when testing yesterday.
It seems like the issue is with a combination of Minimal Theme + Excalidraw. The delay is noticeable, too, unfortunately. |
So this is partially good news. If I understand the earlier measurements correctly, "old excalidraw" with default theme took ~1700ms, which is now down to 400ms. That is a huge improvement, since "new Excalidraw" plus the Obsidian default theme results in no impact to Obsidain performance. I will investigate what minimal theme might be doing that is causing such a major performance drag... (400 to 700 is also an almost 100% degradation), but, to manage expectations, I can't address the issues caused by other plugins and themes. On top of that, unfortunately, I haven't had the real partnership response from Stephen when I tried to address minimal theme and Excalidraw compatibility with him earlier (#502) - so I don't really have high hopes for cooperation now :( |
I just found out the reason of the huge performance issue with my vault was Excalidraw, and after reading this post i disabled my minimal theme and re-enabled Excalidraw and it is fixed. The impact is so huge, like CPU don't stop to drop to normal levels for minutes after launch and I can scroll smoothly at all. I hope you guys fix this issue soon as I am a big fan of both this plugin and minimal theme. And I would love to help you guys in case you need any info for debugging. Thanks |
I just discovered this conflict between Minimal and Excalidraw was causing lag on my system as well. I hope you all can get it fixed. I'm willing to provide any info needed for debugging as well. |
@Comprehensive-Jason, @Archie-2021: Please also raise this issue with Minimal Theme as well. I'll take a look at this during the holidays. |
Sure , I will raise the issue with them too. Thanks |
Similar performance problem for me. Maybe this issue will be helpful. |
Similar performance issue also for me. Bad with default theme. More bad with minimal theme (Debian 12, v1.4.16. Every plugin disabled except Excalidraw. Using deb package) |
Today I noticed on another of my vaults that the issue with Excalidraw exists even when I disable Minimal theme. It only goes away when I disable this plugin. |
@Archie-2021 yeah I also still have the slow down on default theme but it's just worse on a custom theme. |
Someone please help me with a repeatable/measurable test sequence to reproduce this. I created a new vault, I installed minimal theme and the minimal theme config plugin, plus Excalidraw. I set CPU throttle to 6x slowdown so as to counter my desktops performance. I am unable to spot any performance issues. Do you experience slowness when a drawing is open, or just when Excalidraw is loaded to memory? Do you experience slowness in a markdown document, or in Excalidraw? Please help me with step by-step when I need to do so I can see a difference when running performance profiler in developer console. Thank you! |
I did 3 tests all roughly 10 seconds long. 2nd with only Excalidraw enabled: render time 1089ms; Idle time: 5823ms 3rd with both Excalidraw and Minimal Theme + Theme Settings enabled render time: 1297ms, idle time 5341ms There does seem to be a gradual increase in render time (twice +20%), though the test is hardly definitive. Interestingly, in the second case, while render time increased, idle time increased as well. Maybe I was not pushing the keyboard vehemently enough? |
At least in my case it is visable when I try to scroll the page or move the cursor (I use vim mode and moving the cursor is so so rough when this slow down happens) and this is how i finally could figure out the issue at last, because I didn't have any other metric to measure it. |
does it happen without VIM mode as well? |
I find the easiest way to test the slowdown is to type in an empty Markdown note. Without Excalidraw, the typing is smooth and normal. With Excalidraw, there is an inconsistent delay and lag between my keypress and the letters showing up on screen. I record the performance while typing in a note, then look at the time spent on Recalculate Style. Here's a video: https://drive.google.com/file/d/18Bwf68ZNQ2HbSEGCiq2d5smQ310whx80/view?usp=sharing For some reason though, sometimes the performance feels fine with Excalidraw when I first open Obsidian. Only after I use it for a bit does the lag start appearing. |
Exactly, it is not just moving the cursor, it is a huge delay to any keyboard input when I am typing too, which may have nothing to do with vim mode |
So I think this is a CSS issue. If I delete the Excalidraw CSS styles from document performance improves. This led me to see that excalidraw littered with lots of <style> tags. I rolled back all the way to April 2021, it seems the plugin has always been like this. I've now cleaned it up, however performance did not improve - I think. I'd appreciate if you could try this new styles.css and main.js and let me know your experiences. unzip and copy contents to .obsidian/plugins/obsidian-excalidraw-plugin. Restart Obsidian and let me know if you experience improvement. I looked at |
Has anyone tried uninstall/reinstall Obsidian completely? I got a new SSD and I reinstalled Windows which I had to reinstall Obsidian and now the performance issues I had are gone with Excalidraw enabled with default/minimal theme. Anuppuccin theme still kills the performance though. Have you tried this @Steven-AA ? |
No I did not. Seems that you have a different performance bottleneck. The temp new file above already works perfect for me. |
@Steven-AA hope you have upgraded to 2.0.13 and not using the temp file still. All the performance enhancements are included in the new version - plus some fixes (such as using the temp file the stencil library is not visible, because I purged the excalidraw.css too aggressively.) |
I started to find Obsidian slowing down for some reason. Then I followed the performance debug process, and after confirming that it runs flawlessly in Restricted mode, I started the bisection process, and it turned out that when I enable Excalidraw, I notice the ~1s latency when switching notes, for example. Then I went to Excalidraw issues page and found this issue. It turns out I also have Minimal theme installed. I tried disabling Minimal theme and using the Default theme, while keeping Excalidraw enabled, and the slowdown would go away. I can live with the Default theme for now, but just beware, there is something in these two plugins that makes them not get along well. Obsidian v1.4.16 |
Just played around with extensions and also noticed that excalidraw had an high impact on typing performance (using minimal), but also want to note that having sidebars open with notes in it severely decreases performance additionally |
Do you experience the same with the default theme? If not, then please
raise this with the minimal theme. I've done what I can on my end...
…On Wed, Feb 21, 2024, 01:53 Roman Balzer ***@***.***> wrote:
Just played around with extensions and also noticed that excalidraw had an
high impact on typing performance (using minimal), but also want to note
that having sidebars open with notes in it severely decreases performance
additionally
—
Reply to this email directly, view it on GitHub
<#1456 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADNRO6UR5LILHGF322X4FYLYUVAQ3AVCNFSM6AAAAAA7V4QC2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJVGU3TQMZZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@roman-balzer, (or anyone else who has energy for this....) As I do not use the Minimal theme, you could help with some testing to try to see what the problem might be using the method of elimination. I want to understand if the issue is because of some conflict between the Minimal theme css and the Excalidraw css or because of something in the plugin code. I have an assumption this is CSS related, this is what I'd like to confirm or prove wrong. For this testing
CSS Snippets to play with (You'll need to download and unzip these css files):
Do you experience similar performance issues when this css snippet is enabled as when Excalidraw is enabled?
Do you experience similar performance issues when this css snippet is enabled as when Excalidraw is enabled?
Do you experience similar performance issues when this css snippet is enabled as when Excalidraw is enabled?
|
Hi,
I'm experiencing performance issues, when I have this plugin enabled: When typing some letters or sentences on my keyboard, the editor shows them much later (~ 1 second) than without enabling this plugin...
See my current debug info:
SYSTEM INFO:
Obsidian version: v1.5.0
Installer version: v1.4.13
Operating system: Windows 10 Pro 10.0.22621
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: dark
Community theme: Minimal v7.4.2
Snippets enabled: 2
Restricted mode: off
Plugins installed: 61
Plugins enabled: 6
1: Calendar v1.5.10
2: Copy as HTML v1.1.3
3: Dataview v0.5.64
4: Diagrams v1.5.0
5: Excalidraw v2.0.2
6: File Tree Alternative Plugin v2.3.6
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
... unfortunately I experience the same behavior when disabling File Tree Explorer...
so:
this configuration works fine:
1: Calendar v1.5.10
2: Copy as HTML v1.1.3
3: Dataview v0.5.64
4: Diagrams v1.5.0
5: Excalidraw v2.0.2
this configuration works also fine:
1: Calendar v1.5.10
2: Copy as HTML v1.1.3
3: Dataview v0.5.64
4: Diagrams v1.5.0
5: File Tree Alternative Plugin v2.3.6
but this configuration has performance issues:
1: Calendar v1.5.10
2: Copy as HTML v1.1.3
3: Dataview v0.5.64
4: Diagrams v1.5.0
5: Excalidraw v2.0.2
6: File Tree Alternative Plugin v2.3.6
Do you have an idea, how to proceed?
same issues with this configuration, that has the same performance issues:
without plugin 9) there are no issues and without plugin 10) there are no issues. If both are enabled, there are issues....
The text was updated successfully, but these errors were encountered: