Skip to content
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

Wait until onLayoutReady before running commands #72

Closed
liamcain opened this issue May 5, 2021 · 1 comment
Closed

Wait until onLayoutReady before running commands #72

liamcain opened this issue May 5, 2021 · 1 comment

Comments

@liamcain
Copy link

liamcain commented May 5, 2021

https://github.com/denolehov/obsidian-git/blob/5a654bde4e5c0374627250f64ef8f1ccb5c466eb/main.ts#L101

Currently init is being called from within onload which slows Obsidian's startup time. Instead you should wrap this in onLayoutReady so that it's non-blocking.

@Vinzent03
Copy link
Owner

Vinzent03 commented May 5, 2021

Oh, I thought this wouldn't make a difference, because I am not awaiting it, but you are right it does already some things, which aren't async.

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

No branches or pull requests

2 participants