Uh oh!
There was an error while loading. Please reload this page.
Reduce number of parse calls - #58
Conversation
Uh oh!
There was an error while loading. Please reload this page.
| const dummyData: ParseResult = { reports: [], version: 1 }; | ||
| this.parseDiagnosticsData(JSON.stringify(dummyData)); |
There was a problem hiding this comment.
I don't really like this approach that we are creating a dummy data only to call this function. Why do we need to call parseDiagnosticsData here? To initialize this._diagnosticEntries and other variables? In this case we can initialize these fields here too. Also if it contains some extra logic we can create a separate function for it and we can call it here and in the parseDiagnosticsData function.
There was a problem hiding this comment.
Moved the field initializations here.
The parseMetadata does a little bit of extra processing when deciding whether this._selectedEntry should be kept, but selectedEntry cannot exist inside the unloading if, so it's no concern here.
5b250e8 to
c95cb6dCompareDoes not call parse: * When open files did not change * When there's no files open * When an opened window is an 'output://' window
c95cb6d to
2421b52Compare
Fixes#39.
The extension no longer executes a parse call when: