Skip to content
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

Improve performance with artifact id completion #467

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Jul 28, 2023

This PR improves the completion with artifact id. It seems that completion is slow with artifact ids because the lemminx maven returns too many completion items. In my case I have around 4000 completion items which is slow.

The idea of this PR is just to filter the artifactid if it matches one of a character of the computed prefix. The second improvement is to compute just one time the prefix range and not for each completion item.

Here a demo before the PR:

LemminxMavenCompletionSlow

Here a demo after the PR

LemminxMavenCompletionPerf

@angelozerr angelozerr requested a review from vrubezhny July 28, 2023 08:52
@angelozerr angelozerr self-assigned this Jul 28, 2023
@angelozerr angelozerr force-pushed the improve-perf-artifactid-completion branch from 5872090 to f9a9a23 Compare July 28, 2023 15:13
Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr force-pushed the improve-perf-artifactid-completion branch from f9a9a23 to 8cb1e5e Compare July 28, 2023 15:36
Copy link
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

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

The PR looks great!
Thanks!

@vrubezhny vrubezhny merged commit c7b7a14 into eclipse-lemminx:master Jul 28, 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