Open manikantag opened 2 years ago
Just to see what is chocking the perf, I ran perf audit. Not sure if it is expected, but the same methods (like, getCodeFixesAtPosition
) is getting called multiple times even for the same caret position.
Can this perf issue be solved if I use standalone typescript language server? Thanks
I can reproduce. However, what do you need this for:
extraLibs.forEach((lib) => monaco.editor.createModel(lib.content, "typescript", monaco.Uri.parse(lib.filePath)))
Thanks for confirming the issue.
I'm adding all the source files as models so that I'll get IntelliSense from all of them. Is there a way to get the same without adding them as models?
Thanks.
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
Reproduction Steps
Press
Ctrl + Space
afterx.
in the playground output (in the 2nd line:const tt : string = x.next1();
). Suggestions dialog shows 'Loading...' indicator for 12-15 seconds before showing the eligible candidates.Actual (Problematic) Behavior
Adding bulk of definition or ts file models is causing the 'Loading...' indicator for 12-15 seconds for every intellisense request. Not just the initial request.
Expected Behavior
Intellisense requests should complete with in reasonable time which otherwise directly impacts the developer experience
Additional Context
I posted this as a question in Stackoverflow (https://stackoverflow.com/questions/73936684/performant-way-to-load-2000-ts-models-into-monaco-editor-for-intellisense), but the solutions suggested (loading definition files) also didn't worked.
My observation: When I have bulk of files (ex: 2000), then the intellisense is taking longer time. But when I add 200K function declarations to 1 definition file, the perf is very good.