mugiwara85 / CodeblockCustomizer

Codeblock Customizer plugin for Obsidian
MIT License
147 stars 7 forks source link

Excluding Tasks #55

Open pjmavcom opened 9 months ago

pjmavcom commented 9 months ago

So I use the Tasks plugin (here) and with this plugin enabled, the task list is populated slowly. With this disabled, it is instant. I tried excluding the language by adding 'tasks' to the language list, but that does not help. Neither does adding 'exclude' to the code block, though I am not sure I am defining it correctly.

This is a code block I use for the task list:

```tasks
path includes /Schedule
done
filename includes Project1

There are only 16 tasks in the list at the moment. It takes about a second for this list, but the master list that holds all the tasks takes 30 seconds to load. Both lists are instant when this is disabled though. Is there something I am missing to get this to work correctly? Let me know if you need more info. Thanks for the help!

mugiwara85 commented 9 months ago

Whyt do you mean by "you are not sure if you are defining it correctly?"

If you excluded tasks, either by defining it in the settings, like this: image or defined the exclude parameter in the first line of the code block, then it should look like this way. (Excluded code block, and a normal code block) image

I don't know this plugin, so you'll have to explain to me, how I can reproduce the issue. Also does this problem occur in editing mode or reading mode, or both?

pjmavcom commented 9 months ago

I'm not sure I'm defining it correctly because there are no examples of defining 'exclude' anywhere. And what you posted does not show it either. I assume the first line needs to look like this: ```tasks exclude Is that what defining it means? If so, there is no change in what happens. I did add it to the 'Exclude languages' section, but it did not change anything, it is still slow. I didn't think to check on reading or editing view, but here is what I found: In editing mode, the list of tasks populates one at a time, and takes about one second to populate a list of 16 tasks. In reading mode, it populates all at once, but it takes more than a second for the whole list to show (there is about a one second delay in the list showing). In both modes, with CodeblockCustomizer disabled, the lists populate almost instantly. It's like for every task it adds, it runs the block through whatever code your plugin has. So for the 16 tasks in that list, it runs it 16 times. That's just what I am thinking. It looks as though, even though it is excluded, it is still processing it.

Edit: I uploaded a video to YouTube to show the effect I'm talking about here

pjmavcom commented 9 months ago

So, I tried a different code block style plugin and I get the same issue. So I don't think there is a bug with this plugin.

mugiwara85 commented 9 months ago

I am happy to help, but I still don't know this plugin. You'll have to send me some tasks, or the code you are testing with, or explain how to set it up, so I can reproduce the issue.