czottmann / obsidian-mononote

An Obsidian plugin that ensures each note occupies only one tab. If a note is already open, its existing tab will be focussed instead of opening the same file in the current tab.
https://obsidian.md/plugins?id=zottmann
MIT License
89 stars 2 forks source link

Ctrl-Tab is so slow and buggy when it is active #23

Closed Archie-2021 closed 2 months ago

Archie-2021 commented 3 months ago

Hello,

I was forced to deactivated this plugin because recently I found the reason my tab switching is so painfully slow (and it jumps in opposite direction) is because of this plugin. I guess it is checking something on every new tab change, but I don't think it is necessary. I only time it should check for a change is when I try to open something new. I hope this get fixed because I really like this plugin and think such a feature should be even built-in in Obsidian.

Thanks

czottmann commented 2 months ago

Thanks for the report, @Archie-2021.

I guess it is checking something on every new tab change, but I don't think it is necessary. I only time it should check for a change is when I try to open something new.

It does indeed but that's because Obsidian sends out notifications when the focus moves to another tab, and this is what Mononote hooks into. There's no way to filter the notifications beforehand, so Mononote has to react to every single one. This works better with a small number of open tabs, because the plugin needs to compare the currently active tab against all of them.

That said, I'm researching how to make the situation better but it's not as simple as it seems from the outside.

[I] think such a feature should be even built-in in Obsidian

You and me, both 😉