lastMacroCache is now invalidated using lodash after parameter comparison. This was on the order of 1000x faster in worst case scenarios (~4000 macros)
Initial passage collection and parsing now runs asynchronously. This was on the order of 10x faster in worst case scenarios. (~500 files/ 10k passages)
parseConfiguration now runs asynchronously. Each additional configuration file now introduces minimal performance impact
Function changes:
changeStoryFormat return type changed from Promise<void> to Promise<vscode.TextDocument>
yamlParse made into separate function for easier error management and future language specific handling. configuration.ts:115
parseRawText and parseText now accept an extra optional parameter that bypasses updating workspaceState. Passages will be resolved through or stored in this parameter
macroList and enumList are explicitely async functions now instead of TS rewriting them
hover and hoverProvider now respect cancellation tokens
isObjectSimpleEqual has been commented out in favor of lodash's isEqual
Bug Fixes:
Parameter compare could crash the extension if parameters failed to load completely
Package updates:
glob updated to 7.2.0
lodash 4.17.21 installed
Future considerations:
glob can be removed by switching to vscode.workspace.findFiles which is faster in almost all circumstances (it manages its own cache)
updateDiagnostics and parseText can be optimized further
macroCache updating could be simplified and improved to run asynchronously without so many loops
Performance changes:
Function changes:
changeStoryFormat
return type changed fromPromise<void>
toPromise<vscode.TextDocument>
yamlParse
made into separate function for easier error management and future language specific handling.configuration.ts:115
parseRawText
andparseText
now accept an extra optional parameter that bypasses updating workspaceState. Passages will be resolved through or stored in this parametermacroList
andenumList
are explicitely async functions now instead of TS rewriting themhover
andhoverProvider
now respect cancellation tokensisObjectSimpleEqual
has been commented out in favor of lodash'sisEqual
Bug Fixes:
Package updates:
Future considerations: