Replies: 1 comment 3 replies
-
A few notes:
If you do want an AST cache, such as for skipping re-parsing the AST for multiple rules on the same file, you can probably do something easy by holding a small LRU cache in-memory (implemented with just a |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am working on Obsidian Linter. In it, there is a performance issue with parsing the abstract syntax trees (ASTs). This can be costly and really unperformant especially when there are no changes made in a file and many rules are run against it since it currently parses the file for each rule being run no matter what. I would like to cache the AST possibly just while running the linter or maintain a cache in local storage like I see has been done here with dataview.
Is there a recommended strategy for this or do you have any pointers on how to go about doing this?
The linter can run against all files in the vault, all of them in a specific folder, or just the current file. I am thinking a cache like the one done in dataview probably is better for that scenario.
The cache would have to be updated each time a file is modified, created, deleted, or moved.
All suggestions and recommendations are very welcome.
Please let me know if this is not the place to ask this.
Beta Was this translation helpful? Give feedback.
All reactions