vscode-markdown-notes
vscode-markdown-notes copied to clipboard
improve performance with textDocuments APIs
Using the VS Code APIs for documents in the work space could be much more efficient than repeated just-in-time parsing of all documents in workspace.
https://code.visualstudio.com/api/extension-guides/virtual-documents#events-and-visibility
-
vscode.workspace.textDocuments
-
onDidChangeTextDocument: Event<TextDocumentChangeEvent>
An event that is emitted when a text document is changed. This usually happens when the contents changes but also when other things like the dirty-state changes.
The events APIs would enable us to re-process only when documents change, perhaps, and keep a class-level cache of all the Tag and Note References / backlinks.
See also: https://github.com/microsoft/vscode-extension-samples/search?q=textDocuments&unscoped_q=textDocuments
Closed by #40