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 CodeAction performance with CodeAction#data & resolveCodeAction #941

Closed
angelozerr opened this issue Dec 8, 2020 · 0 comments · Fixed by #1224
Closed

Improve CodeAction performance with CodeAction#data & resolveCodeAction #941

angelozerr opened this issue Dec 8, 2020 · 0 comments · Fixed by #1224
Labels
code action performance This issue or enhancement is related to performance concerns
Milestone

Comments

@angelozerr
Copy link
Contributor

LSP 3.16 provides 2 new CodeAction support that LemMinx should use for their code action:

For instance, LemMinx provides several code action to generate XSD, DTD from the given XML file which is not bound to a grammar. This process should be done in the resolveCodeAction instead of doing that every time that XML root element is hovered.

For instance, when a XML doesn't respect a XSD, for an element, we have a CodeAction which suggest the proper element. This CodeAction recompute those available elements although the validation provided them. The idea is to generate diagnostics with data which contains allowed element (coming from the Xerces XSD validator) https://github.com/eclipse/lsp4j/blob/985a92bc0a0f543aa379edecbf0ddd56bed4df6f/org.eclipse.lsp4j/src/main/xtend-gen/org/eclipse/lsp4j/Diagnostic.java#L93 and code action will be able to reuse this data instead of recomputing allowed elements.

@angelozerr angelozerr added code action performance This issue or enhancement is related to performance concerns labels Dec 8, 2020
@angelozerr angelozerr changed the title Improve CodeAction perfromance with CodeAction#data & resolveCodeAction Improve CodeAction performance with CodeAction#data & resolveCodeAction Dec 9, 2020
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 7, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 8, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 9, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 9, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 9, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 10, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 10, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 10, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 10, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 10, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 10, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 11, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 11, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 11, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 11, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 11, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 14, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 14, 2022
angelozerr added a commit to angelozerr/lemminx that referenced this issue Jun 14, 2022
@angelozerr angelozerr added this to the 0.21.0 milestone Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code action performance This issue or enhancement is related to performance concerns
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant