vscode-markdown-notes icon indicating copy to clipboard operation
vscode-markdown-notes copied to clipboard

improve performance with textDocuments APIs

Open kortina opened this issue 4 years ago • 1 comments

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

kortina avatar Jun 01 '20 22:06 kortina

Closed by #40

kortina avatar Jul 01 '20 06:07 kortina