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

Improve mounting time #4

Open
harababurel opened this issue Jun 27, 2018 · 4 comments
Open

Improve mounting time #4

harababurel opened this issue Jun 27, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@harababurel
Copy link
Owner

GCSF populates the file tree at mount time, making O(tree depth) requests to Drive (one request for each level). This can be reduced to O(1) but requires a better strategy for constructing the tree internally.

@harababurel harababurel added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jun 27, 2018
@xTrulyForsaken
Copy link

hey im really new to this. but i would like to try.

@mailvijayasingh
Copy link

hey @harababurel I am new to rust but I like the project. I will be looking into this issue. @xTrulyForsaken you can keep working on this, if I get to understand something, I will share with you.

@harababurel
Copy link
Owner Author

Glad to hear you're interested in contributing. Have you made any progress in the meantime?

The strategy that I had in mind looks something like this:

  1. Request all files from Drive, possibly on multiple pages. This is already implemented; might require small changes.
  2. Determine which ID corresponds to the root directory.
  3. Process the files locally and reconstruct the tree starting from the root.
  4. Try not to do this in a terribly inefficient way. One way is to do multiple passes on the list of files. At each pass, there is a fixed set of parents that you want to populate (initially, the root dir is the only element in this set). Iterate through all remaining files and add those who have the correct parent to the tree. Repeat the process with a new set of parents (the ones encountered during the previous pass).

Does this make sense? Let me know if you need any additional info.

@xTrulyForsaken
Copy link

Yea ill do what i can. Ill let you know if im lost on it. Im just getting to it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants