Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spike: Experimentally cache data from query.allTasks calculations #3339

Merged
merged 12 commits into from
Feb 18, 2025

Conversation

claremacrae
Copy link
Collaborator

Types of changes

Changes visible to users:

Internal changes:

  • Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)
  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)

Description

WARNING: this mechanism may be changed or removed at any time: it is not recommended for use by users at this stage.

This is an experimental PR, with work-in-progress, to see if I can speed up custom instructions that use query.allTasks to iterate over all tasks in the vault.

  • It provides a mechanism to cache calculated values at the start of the search, rather than re-calculating them for all tasks, once-per-task.
  • I like the mechanism, but it requires too much JavaScript knowledge for me to be comfortable yet, documenting it for users.

Motivation and Context

Exploring speeding up the search in:

Once this is merged, I will be able to use it in my own vault, and see if I can:

  • come up with some simpler examples to use in documentation, or
  • come up with an easier-to-use implementation

How has this been tested?

  • Automated tests
  • Exploratory testing

Screenshots (if appropriate)

Checklist

Terms

@claremacrae claremacrae added type: internal Only regards development or contributing scope: scripting Issues to do with custom filters, custom sorting and similar labels Feb 18, 2025
@claremacrae claremacrae merged commit ae1524e into main Feb 18, 2025
4 checks passed
@claremacrae claremacrae deleted the cache-user-search-data branch February 18, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: scripting Issues to do with custom filters, custom sorting and similar type: internal Only regards development or contributing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant