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

Implement a streaming ls api #4882

Closed
Stebalien opened this issue Mar 27, 2018 · 5 comments
Closed

Implement a streaming ls api #4882

Stebalien opened this issue Mar 27, 2018 · 5 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature topic/commands Topic commands

Comments

@Stebalien
Copy link
Member

Currently, when listing large directories, the file list needs to be buffered in memory. This is fine for ~50K files but likely won't work well for ~1M files (in a single directory).

Unfortunately, ipfs ls accepts multiple arguments. If we want to stream back results, we'll have to somehow group them by directory (hopefully without sending too much extra data).

@Stebalien Stebalien added kind/enhancement A net-new feature or improvement to an existing feature topic/commands Topic commands labels Mar 27, 2018
@ajbouh
Copy link

ajbouh commented Mar 28, 2018

You can also say that streaming is only supported for a single directory input, no?

@ajbouh
Copy link

ajbouh commented Mar 28, 2018

Just added some performance measurements for a big 1.2M file sharded directory over at tesserai/iptf#2 (comment)

@Stebalien
Copy link
Member Author

You can also say that streaming is only supported for a single directory input, no?

I'm currently thinking:

  1. Spit out the directory "object" with a Links: "streaming" (or something like that) field.
  2. Follow it with the stream of links.

That way, we don't change the output format based on the number of inputs.

@ajbouh
Copy link

ajbouh commented Mar 29, 2018

I'm not deeply familiar with this interface, but what you've outlined certainly sounds reasonable

@Stebalien
Copy link
Member Author

(fixed in #5611)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature topic/commands Topic commands
Projects
None yet
Development

No branches or pull requests

2 participants