Skip to content

Conversation

@jasonlyu123
Copy link
Member

圖片

I also changed the Auto import from ... message to the message provided by typescript. Making it consistent with VSCode's built-in typescript feature.

圖片

One thing that differs from VSCode+tsserver is that tsserver has some internal APIs for caching auto-import-related info. So the source of the auto-import entry would be calculated at the completion list stage. Without the caching, it would only resolve some of it and the rest would need to be resolved at the resolve completion detail stage. Causing the label detail to be pop-in afterwards.

ours:

圖片

ts
圖片

Volar has a package for patching the internal API. We can consider adding that. It would also help #1792. I tested it with cache, the global completion can improve from 800ms to 100-200ms in one of my projects. But even if we use their package we'll still have to access the internal API for cache invalidation. Left the internal API testing branch here https://github.com/jasonlyu123/language-tools/tree/label-detail-internal for comparison.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

That performance enhancement using the volar library sounds promising. Just to be clear - would this improve the auto completion performance in all/most cases, or just specific ones? Definitely interested in adding this if it improves performance across the board - could you do that in a different PR?

@dummdidumm dummdidumm merged commit 4e17476 into sveltejs:master Jan 9, 2023
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.

2 participants