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

ipfs files ls without -l is faster #2007

Merged
merged 1 commit into from
Nov 26, 2015
Merged

ipfs files ls without -l is faster #2007

merged 1 commit into from
Nov 26, 2015

Conversation

whyrusleeping
Copy link
Member

dont check types of child entries if -l isnt specified.

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
@jbenet jbenet added the status/in-progress In progress label Nov 25, 2015
@daviddias
Copy link
Member

IT'S SO FAST! :D <3

@@ -235,14 +235,33 @@ Examples:
return
}

long, _, _ := req.Option("l").Bool()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a proper argument? makes it appear in --help and also makes it easier to find the options this accepts, when reading the code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right, this only reads the option, i mistook it for its definition

@jbenet
Copy link
Member

jbenet commented Nov 26, 2015

  • this needs sharness tests testing both kinds of outputs

@whyrusleeping surprised this didnt break sharness tests-- are there none for this?

@jbenet
Copy link
Member

jbenet commented Nov 26, 2015

@whyrusleeping this LGTM, but before-- what are example outputs? (or, will see it in the sharness test)

@whyrusleeping
Copy link
Member Author

@jbenet there will be no noticeable difference in the output of the commands, all thats happening here is that we skip fetching each child node in the case where the caller doesnt care about types (when -l is not specified)

@jbenet
Copy link
Member

jbenet commented Nov 26, 2015

Ah ok, so only the JSON output changes, but commands remain the same. ok LGTM

jbenet added a commit that referenced this pull request Nov 26, 2015
ipfs files ls without -l is faster
@jbenet jbenet merged commit e04a31d into dev0.4.0 Nov 26, 2015
@jbenet jbenet removed the status/in-progress In progress label Nov 26, 2015
@jbenet jbenet deleted the feat/fast-files-ls branch November 26, 2015 00:55
@jbenet jbenet mentioned this pull request Dec 7, 2015
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants