TypeScript: how to profile slow autocomplete suggestions for specific types

136 views Asked by At

I'm working on a project with a very complex type, and autocomplete on thatType. (Ctrl-space) is very slow (5-10 seconds).

Is there any way to profile how long it takes the language server to process parts that type is built from during an autocomplete request? I've profiled compile performance with --generateTrace, but I don't see any way to use --generateTrace for other language server operations. And removing any reference to the type doesn't significantly change the compilation time.

I also tried setting "typescript.tsserver.log": "verbose", but I don't see any operations in the log that take as long as I waited for one autocomplete menu to pop up, and none of the output would give any hint about what types are costing a lot time.

0

There are 0 answers