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

avoid excessive memory consumption in picker #8127

Merged
merged 2 commits into from
Sep 1, 2023
Merged

Conversation

pascalkuthe
Copy link
Member

@pascalkuthe pascalkuthe commented Aug 31, 2023

We currently keep the picker around after it's closed to allow it to be reopened. This can lead to excessive memory consumption for very large pickers (like when crawling home with nucleo). This PR ensures that we drop the last picker immediately when a new picker is opened, that we stop streaming in new matches into the closed picker n the background and do not store pickers with more than 100_000 items.

In the long term, a better solution would be to restart the stream (recrawl the FS) for such large pickers instead, but that requires larger changes.

@pascalkuthe pascalkuthe added this to the next milestone Aug 31, 2023
@pascalkuthe pascalkuthe added E-easy Call for participation: Experience needed to fix: Easy / not much A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Aug 31, 2023
helix-term/src/compositor.rs Outdated Show resolved Hide resolved
helix-term/src/ui/picker.rs Outdated Show resolved Hide resolved
Co-authored-by: Chris <[email protected]>
@pascalkuthe pascalkuthe changed the title avoid excessive memory consumption from file picker avoid excessive memory consumption in picker Aug 31, 2023
@archseer archseer merged commit a38ec6d into master Sep 1, 2023
6 checks passed
@archseer archseer deleted the picker_memory branch September 1, 2023 00:13
dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
* avoid excessive memory consumption from file picker

* fix typos

Co-authored-by: Chris <[email protected]>

---------

Co-authored-by: Chris <[email protected]>
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* avoid excessive memory consumption from file picker

* fix typos

Co-authored-by: Chris <[email protected]>

---------

Co-authored-by: Chris <[email protected]>
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* avoid excessive memory consumption from file picker

* fix typos

Co-authored-by: Chris <[email protected]>

---------

Co-authored-by: Chris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants