-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Long running 'completions' request on TS project using lodash #23285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Probably a duplicate of #21968 |
Looks like we are spending lot of time in
Used branch https://github.com/Microsoft/TypeScript/tree/completionLodashPerfInvestigation for these extra debug info and used code and package.json mentioned in repro for this analysis. |
@weswigham can you take a look if we can do something better with |
I get instant completions on |
@weswigham No it still repros. This is what I see. (I think you need to just remove the dot and type it again to ensure that you are getting completion from fresh graph. Note how semantic work takes 8+ seconds ).
|
Hm, you're right, Opened it up and tried it again and saw the problem. Anyway, I have a change that cuts it from around 8s to 3s on my machine; but the core of the issue is what |
@weswigham While I was investigating this, I had questioned whether doing check for correct this parameter is correct. Frankly I think we can just remove that check (since that's valid only for calling and not for assignment of the method to another variable anyways?) That would just break the test case that introduced this check in first place (which I believe was just a single test case) What are your thoughts on doing that instead? |
Caching doesn't really help (why would it) on inspection; I had messed up the cache key while I was looking at it, so it was just skipping a bunch. T.T I'm going to reiterate the "is this really necessary" question, and continue looking into why the comparisons are slow (but I have a suspicion that it's because |
We spend a huge chunk of time in gc - |
Yeaaaah, we allocate 2,334,604 symbols while processing that completion list. For reference, that's about 60x the number we make for the incomplete program itself, or around 7400 symbols per potential completion member. |
Has the problem been solved? I still encountered this problem. The version I used is as follows: I wanna using _.chain([]).mapValues and when i type _.chain([]). ,it will give me intellisense, but seems it need loading 8s and more time. |
This should be fixed by #31377 in the next |
From microsoft/vscode#47253 (comment)
TypeScript Version: 2.9.0-dev.20180409
Search Terms:
Code
In a new folder without a
tsconfig
:package.json
:index.ts
:index.ts
in vscode.ma
Bug:
TS Server
completions
requests end up taking ~6seconds each time. Here's my tsserver logtsserver copy.log
Look for the lines around:
getCompletionData: Semantic work: 6974
The text was updated successfully, but these errors were encountered: