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

optimize creation of code actions annotation region #2239

Merged
merged 2 commits into from
Apr 23, 2023

Conversation

rchl
Copy link
Member

@rchl rchl commented Apr 22, 2023

Workaround a pathological case where server returns hundreds of code actions for the selection and causes ST's memory usage to explode when creating code actions annotation region.

Instead of creating a huge link that includes whole code action response, use response stored in the local self._actions_by_config. This was already the case when using "bulb" for code actions so apart from fixing the memory issue, it makes code more consistent.

Also small optimization to remove local action_lists and all_actions variables that weren't really used for anything and just increased heap memory usage.

@rchl rchl merged commit 7275f88 into main Apr 23, 2023
@rchl rchl deleted the fix/code-action-annotation-lag branch April 23, 2023 19:41
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