I have a huge org file and I use the sparse tree function a lot to help me plan my weeks/months. (The agenda mode just doesn't do it for me; I really need to see it in the context of the tree.)
Because of the file's size, running queries takes a really long time (4-5m).
Most of the tree is marked with specific tags that I can use to disregard some subtrees. The sparse function & my specific query already take tags into account. With my query, anything with those tags is not shown in the result list (the sparse tree). (An example of a tag that I believe is ignored by default is ARCHIVE.)
However, subtrees with tags that will be ignored are still traversed, so it takes the same time to run queries regardless of their tags. I'd like to change that, such that the presence of a tag in a subtree makes org-mode simply not go down that tree at all.
Is it possible?
Note that this is a performance issue. The result is (extensionally) the same; I'm just trying to make it faster.
follow
mode in the agenda to get both the agenda view and the in-tree context view.org-ql
might make things easier (although I have not tried either it or the "native" methods either - caveat emptor).org-ql
a try and by god it is fast. It takes 1 second to produce a sparse tree (org-sparse-tree
takes 4 minutes for the same query).