Skip to content

[CodeCompletion] Reduce accumulating memory per fast completion #28904

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

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Dec 20, 2019

For each fast completion, the memory grows for the source buffer and the AST of the function body. They are kept until the next slow completion.

To mitigate the memory consumption per completion, use sliced source text which is actually needed for the second pass.

rdar://problem/58119719

@rintaro
Copy link
Member Author

rintaro commented Dec 20, 2019

@swift-ci Please smoke test

@rintaro rintaro requested a review from benlangmuir December 20, 2019 19:03
@rintaro rintaro force-pushed the ide-completion-rdar58119719 branch from 810f778 to f42b736 Compare December 20, 2019 20:45
@rintaro
Copy link
Member Author

rintaro commented Dec 20, 2019

@swift-ci Please smoke test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Jan 2, 2020

@swift-ci Please smoke test

For each fast completion, the memory grows for the source buffer and the
AST of the function body in memory. They are kept until the next slow
completion.

To mitigate the memory consumption per completion, use sliced source
text which is actually required for the second pass.

rdar://problem/58119719
This improves diangostics message for completion traces
@rintaro rintaro force-pushed the ide-completion-rdar58119719 branch from 2dc88a3 to 108b9c3 Compare January 2, 2020 22:13
@rintaro
Copy link
Member Author

rintaro commented Jan 2, 2020

@swift-ci Please smoke test

@rintaro rintaro changed the title [CodeCompletion] Reduce leaking memory per fast completion [CodeCompletion] Reduce accumulating memory per fast completion Jan 2, 2020
@rintaro rintaro merged commit 70ad17a into swiftlang:master Jan 14, 2020
@rintaro rintaro deleted the ide-completion-rdar58119719 branch January 23, 2020 22:36
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