Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Save file names to file and load after restart #272

Closed
wants to merge 3 commits into from
Closed

Save file names to file and load after restart #272

wants to merge 3 commits into from

Conversation

antelle
Copy link

@antelle antelle commented Jan 21, 2017

Description of the Change

Hello, this is a quick fix for #271.

Here, I added a simple implementation of saving autocomplete data to a local file.
This way, we can load it after restart and show the ui immediately after a project is open.

The file list is deflated, because it contains a lot of similar strings and using the minimal compression level, we can get huge decrease in size.

Alternate Designs

For now, this is the simplest implementation.

Benefits

This change will bring better support for projects with a lot of files, e.g. >50k, removing quite a long wait time.
Old cache files are removed after a month, if there were no updates.

Possible Drawbacks

A list of files will be saved to .atom folder, this may be unexpected. However old files will be removed in a month, if the corresponding projects are not opened frequently.

Applicable Issues

#271

@antelle
Copy link
Author

antelle commented Jan 21, 2017

Guys, please take a look, I'd like to know your opinion about the idea and design. This PR lacks some tests, e.g. checking that we save only if there're changes, but they are quite fast to add, if the design looks ok from your point of view.

@winstliu
Copy link
Contributor

winstliu commented Jan 22, 2017

I definitely think this could help. /cc @BinaryMuse
I have some style suggestions, but I'll wait after the content review to add those.

@AndreasDahl
Copy link

What is the status of this PR?

@lee-dohm lee-dohm changed the title Save file names to file and load after restart, fix #271 Save file names to file and load after restart Jul 31, 2018
@lee-dohm
Copy link
Contributor

@maxbrunsfeld Would you mind taking a quick look here?

@maxbrunsfeld
Copy link
Contributor

I don't think this is the right solution to this problem. The projects in your file could have changed since the last time you opened Atom, right?

Fundamentally, it should be possible to use an off-the-shelf tool like ripgrep for doing this indexing, eliminating the performance issue. We just haven't had time to switch the behavior. Until we do, I don't think it's worth compromising correctness for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants