obsidian-wielder icon indicating copy to clipboard operation
obsidian-wielder copied to clipboard

[Question] Document Size and Performance

Open iamrecursion opened this issue 2 years ago • 4 comments

I'd love to try this plugin out, but I'm slightly worried that due to the eager evaluation model (it seems to try and parse all code blocks in a page eagerly) it won't cope with large files? I don't necessarily want to use it in massive files, but I'm more worried about opening a huge file in general and having things bog down. Are there any plans to make it less eagerly evaluated?

iamrecursion avatar Jun 23 '22 09:06 iamrecursion

Yeah, https://github.com/victorb/obsidian-wielder/issues/2 would alleviate this concern a bit I believe. Another way could be to not do anything with any code block until the user presses or a "Run" button next to the code block.

Another thing you could do already is changing the Code-block Language setting to something else than clojure (like clojure-eval), and then Wielder would only look for code-blocks defined with clojure-eval and evaluate those instead, so if you have a large document with tons of clojure blocks already, this could help you.

Personally, I tend to split my documents over many pages once they get over a certain size (because it becomes easier to manage and less jumping up/down to find stuff), so I haven't hit this issue myself yet.

But if it's a issue for you, we definitely should try something that could help prevent any performance issues. You think the above solutions could work in your case?

victorb avatar Jun 23 '22 09:06 victorb

Ooh! The code block language setting sounds perfect, but my install doesn't seem to have any settings at the moment? Is there something I have to do specially to add the settings pane?

iamrecursion avatar Jun 23 '22 12:06 iamrecursion

Sorry for the delay @iamrecursion, somehow didn't get notified of your comment...

The settings panel should appear somewhere in the bottom of the general settings panel for Obsidian.

Looks like this for me:

image

victorb avatar Jun 28 '22 18:06 victorb

Strange. I'm not seeing it.

image

I wonder if it's related to the first error in #5?

iamrecursion avatar Jun 28 '22 20:06 iamrecursion