obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.42k stars 227 forks source link

Document tips for getting best performance from Tasks plugin #891

Open claremacrae opened 2 years ago

claremacrae commented 2 years ago

In working on #886 - and from discussions in #697 - I've learned some useful things that are worth sharing for users, for when Tasks' rendering of tasks is slowing down editing.

I would like to write them up before the next release, as a quick list.

claremacrae commented 2 years ago

Deferring this until after 1.9.0 release.

bradmurray commented 2 years ago

Bump - 1.9 was a couple of months ago now

claremacrae commented 2 years ago

Thanks but bumps don't really help add to my available hours in the day!

However, @bradmurray, if I were to give you a long, raw list of bullet points, would you be interested in writing it up as a first attempt at this documentation? It would be a tremendous help.

bradmurray commented 2 years ago

sure

claremacrae commented 2 years ago

Great - thank you. I'm just looking through the file now.

claremacrae commented 2 years ago

Hi @bradmurray, many thanks for agreeing to have a look at this.

The "data"

OK here is the document, heavily improved:

891 - Issue - document performance tips.md

The hardest thing to explain was the Live Preview issue, which I've now got a video repro for, which is in #1177.

Don't feel you need to include all of the content from that file. It was very developer-focused, and the more important thing is a user-focused version of it.

How the docs work

The CONTRIBUTING page has a section on maintaining the documentation, and it links to the docs/README.md which shows how to run the docs on your local machine.

Where to put the new file

I suggest putting it as a new page inside Advanced for now... I'll find a better location for it by the time it's published. (I'm thinking of a new 'Getting Help' section...)

Anything else...

Please don't hesitate to ask if anything doesn't make sense. And we could always have an audio or video call online if it would get you up to speed faster, or help in any way.

Thanks again!

claremacrae commented 1 year ago

Hi @bradmurray - no pressure at all, but how are you feeling about this?

No pressure either way, if you would either like to have a look at it, or not have a look at it. Either is fine.

FabianoLothor commented 1 year ago

Hey mates, do you know if is there any way to avoid the instant refresh when I'm editing a task?

Sometimes when I've multiple tabs and I try to update a small typo in a checklist, it's super slooooow to do.

It would be nice to turn-on/off the auto-refresh or have an option to update it after a few configurable minutes (let's say, 5 minutes), in the meanwhile, the queries would use the cache values, it would require an option to force the refresh of course.

There is a nice plugin called Jira Issue that does that.

image

Other option could be: update only when the cursor of the user leaves the task-line.

claremacrae commented 1 year ago

We are not all guys.

FabianoLothor commented 1 year ago

Sorry @claremacrae :facepalm: :sweat_smile:

Comment updated. :p

claremacrae commented 1 year ago

Thank you. So the tips are in the document linked in comment https://github.com/obsidian-tasks-group/obsidian-tasks/issues/891#issuecomment-1257024257

the good news is that issue mentioned in #1177 has since been fixed in Obsidian.

elvarb commented 1 year ago

After reading the performance tips document you might want to include a note of something to absolutely not do. Create multiple documents that just query tasks all over the place, include them all in a single Canvas document and pin the Canvas 😁

claremacrae commented 1 year ago

After reading the performance tips document you might want to include a note of something to absolutely not do. Create multiple documents that just query tasks all over the place, include them all in a single Canvas document and pin the Canvas 😁

😢 - sorry about that! Thank you very much indeed.

claremacrae commented 3 months ago

Discovered yesterday: using dataview to generate task queries means that brand new task queries are created on every dataview refresh interval, regardless of whether any data changed.

For this reason, I closed:

I've now set my dataview refresh interval to 5 minutes, because I don't really do other dataview searches on rapidly changing data.

A good alternative is js-engine - although I haven't found out how to put markdown blocks inside tables in this plugin yet. See: