Skip to content

Conversation

@superle3
Copy link
Collaborator

Optimize the scrolling when conceal is enabled.
Currently the whole concealment array is being recomputed even though nothing has been changed.
The change is not that much from 4-8 ms to <1ms on my machine, but the little things may add up.

There is also currently a bug, where the syntaxtree hasn't been fully computed yet.
To reproduce: Reload page without saving and go bottom with G in vim.
ensureSyntaxTree(state,to) can be used or we can debounce a view.dispatch when its not available.
@llakala do you maybe have any comment? ensureSyntaxTree didn't take more than 30ms on my machine even with 22,222 words, but ensureSyntaxTree only updates a local tree and not the global syntax tree.

Also the bug is very minor so idk if its worth the extra complexity.

optimize by not recomputing the conceal when its not necessary
@llakala
Copy link
Contributor

llakala commented Sep 14, 2025

I've been using Neovim with Typst for notes recently, so haven't been touching Obsidian!

Concept looks good to me. Honestly, I think it may be worth it to commit to a minimal fork. If @artisticat1 becomes more active again, you can always upstream individual commits back in - but you have a lot of open PRs that haven't received review, and I think you deserve a place to consolidate these patches for anyone to use.

@superle3
Copy link
Collaborator Author

superle3 commented Sep 14, 2025

Thank you for responding so quickly,
Am currently in the process of porting this plugin to overleaf/ am extracting all the obsidian components out of this plugin at here and the performance issue was worse on overleaf.
So I first tried to fix it on obsidian since it has a better dev environment and got into that bug.
But you will only notice that bug when using vim, so was curious if you noticed it (and thus if it was worth fixing).

Honestly, I think it may be worth it to commit to a minimal fork.

In #433 @artisticat1 said

I graduated and don't write much LaTeX anymore, and also don't have as much time to review PRs as I used to - would you be interested in me adding you as a collaborator on this repo? That way, you (and other contributors) wouldn't be held up by me no longer having the time to devote to this project :)

I said yes? but no response?, not sure what is going on there.
If the silence is very long and I have incorporated everything I want in the overleaf port, I may base a fork on the npm package instead of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants