dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.68k stars 252 forks source link

Dendron starts in non-Dendron workspaces and is slow to start anyway #1540

Open lnicola opened 2 years ago

lnicola commented 2 years ago

Please select the area your Bug applys to.

Describe the bug

The Code extension slows down the editor startup.

To Reproduce

Steps to reproduce the behavior:

  1. Open a project that's not a Dendron workspace
  2. Open the extension list
  3. Note how Dendron takes a long time to start

Expected behavior

  1. Dendron only starts in Dendron workspaces
  2. It would be nice if it started faster even in those, but whatever

The other annoying thing is that Dendron brings two "Show Preview" commands that conflict with other commands in popular extensions. Sometimes I'm editing AsciiDoc or another Markdown file, and I run the Dendron command by mistake.

Screenshots

Here it took 256 ms on a reasonably fast computer:

image

Desktop (please complete the following information)

Additional context

Since Dendron is already split between multiple extensions, my suggestion is to split the workspace initialization into another extension. This way, "Initialize workspace" would always be available, but the main extension could have an "workspaceContains:dendron.yml" activation event instead of "*".

Dendron Log file

N/A

kevinslin commented 2 years ago

For Dendron taking a long time to start on a non-dendron workspace, will take a followup to look into that. Our work Q for next week is already full so this will be the following week. For Show Preview, we can add a context clause to have it be available when working inside a Dendron workspace. Mind splitting that off in a separate feature request?

lnicola commented 2 years ago

Filed #1545.

Don't worry about taking longer to solve it. It's open-source (and free) software. If it gets fixed in the next six months or so, I'm happy :-).

kevinslin commented 2 years ago

This should be fixed in v69. Can you let us know if this is still an issue?

lnicola commented 2 years ago

Maybe I'm missing something, but it still gets activated in a non-Dendron directory.

image

image

image

kevinslin commented 2 years ago

ah - you're right. i was mixing this up with the preview issue. will keep this open