Skip to content

Cache completion validity, remove too-precise completion this inference #28611

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

Closed

Conversation

weswigham
Copy link
Member

Fixes #23285 some. Could still stand to be better.

From my comment in the other thread

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 isValidPropertyAccessForCompletions is doing right now - it's essentially doing a (partial) call resolution, which is fairly expensive. My change caches the result, so it can be reused if encountered again, which seems to help, since completions is always followed by a completion entry details request which currently repeats the work.

This fixes the obvious deficiencies we had with respect to repeated work and mostly unnecessary work - something in lodash is still hideously expensive to compare, however, which probably merits looking into separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long running 'completions' request on TS project using lodash
1 participant