Skip to content
Discussion options

You must be logged in to vote

I think the main issue is you are not making use of the dataview index. For example, in this section:

if (tasksFromIncludedPages && dv.current().includetasksfrom) {
  taskList = taskList.concat(
   dv.pages()
	.where(p => dv.current().includetasksfrom.some(n => (p.file.name == n) || (String(p.file.link) == String(n))))
	.file.tasks.where(t => !t.completed && 
		 dv.date(t.defer) <= dv.date('today')))}

You are filtering over EVERY page to find the pages that are in your list. You should not do this - instead, iterate over the pages in the list directly:

if (tasksFromIncludedPages && dv.current().includetasksfrom) {
  for (let page of dv.current().includetasksfrom) {
    taskList = taskList.c…

Replies: 4 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ces3001
Comment options

Comment options

You must be logged in to vote
10 replies
@ces3001
Comment options

@ces3001
Comment options

@ces3001
Comment options

@blacksmithgu
Comment options

@ces3001
Comment options

Answer selected by ces3001
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants