MSzturc / obsidian-advanced-slides

Create markdown-based reveal.js presentations in Obsidian
https://mszturc.github.io/obsidian-advanced-slides/
MIT License
1.01k stars 85 forks source link

Plugin affects performance of obsidian/dataview #280

Open serpro69 opened 11 months ago

serpro69 commented 11 months ago

Hi, Thanks a lot for this plugin! It seems quite useful to be able to create revealjs presentations directly in obsidian. But I'm having some performance issues with it that makes the plugin quite unusable for me on a regular basis.

Describe the bug

It appears that your plugin is significantly affecting performance of dataview (or possibly the whole obisidian)?

This is the profiling with the plugin enabled: image

And this is running the same query after disabling the plugin: image

Samples to Reproduce

Add some dataview queries and profile the app while triggering a query refresh with and w/o the advanced-slides plugin

Expected behavior

Performance shouldn't be affected so much by the plugin. I see a 5x performance improvement after disabling the plugin.

pachwi commented 10 months ago

I can confirm this!
Also have huge problems with this combination.

https://github.com/blacksmithgu/obsidian-dataview/issues/2189

I first thought it was a issue with the newest update from obsidian.

But it is definitively advanced sliders - only working if you deactivate this!

serpro69 commented 10 months ago

I've had to deactivate it as well. It's a shame, I've really liked the plugin, but obsidian was barely usable for me. Hopefully this can be fixed.

MSzturc commented 8 months ago

The rendering of reveal slides is pretty expensive. In my rendering logic I re-render them only if there are changes in the current slide to reduce the load. For some reason, dataview invalidates the view which causes obsidian to rerender the slides. That's something I don't have control of from the plugin. I did a bit of debugging and noticed that in some dataview szenarios I got 20-30 slide updates per second. Im not a expert when it comes to the plugin architecture of obsidian but my guess would be that dataview is doing something that causes the slide to re-render. As long as I don't understand why that is happening I can't find a fix. Maybe the ppl from dataview have an explanation on that topic.