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

Delete ContextArray #1199

Merged
merged 6 commits into from
Aug 6, 2024
Merged

Delete ContextArray #1199

merged 6 commits into from
Aug 6, 2024

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Aug 6, 2024

The ContextArray is used to store contexts of each ranges in the source code for user interactions including completions. We found the ContextArray related operations take time, while it is essentially unnecessary because we only need the context for given cursor position.

This PR removes all of the ContextArray related operations and introduces CursorContext which stores context around the cursor.

The result is not huge. It seems this PR improves the execution performance ~5%.

@soutaro soutaro added this to the Steep 1.8 milestone Aug 6, 2024
@soutaro soutaro merged commit 2055e83 into master Aug 6, 2024
23 checks passed
@soutaro soutaro deleted the context branch August 6, 2024 08:25
@soutaro soutaro added the Released The PR is already included in a published release label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released The PR is already included in a published release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant