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 pin ls should list recursive pins only by default #5556

Open
djdv opened this issue Oct 3, 2018 · 5 comments
Open

ipfs pin ls should list recursive pins only by default #5556

djdv opened this issue Oct 3, 2018 · 5 comments
Labels
effort/hours Estimated to take one or several hours exp/expert Having worked on the specific codebase is important need/maintainers-input Needs input from the current maintainer(s) P2 Medium: Good to have, but can wait until someone steps up

Comments

@djdv
Copy link
Contributor

djdv commented Oct 3, 2018

Currently, ipfs pin ls will list all pins.
This is an expensive operation and it seems like most people want ipfs pin ls --type=recursive anyway.
I propose that we change this so that recursive pins are listed by default (--type=recursive), and --type=all should be explicitly required for listing all pins.

Even if we make listing all pins fast, @lgierth points out that ipfs add pins objects recursively by default. So we may want to still do this anyway for consistency's sake.

@lidel
Copy link
Member

lidel commented Oct 3, 2018

cc #4891 (somehow related performance changes to ipfs ls)

@Stebalien
Copy link
Member

I agree we should do something like this but we'll need to improve the options. Really, we need --not-type=indirect. We do want to include direct pins.


However, this is a large, API-breaking change.

@whyrusleeping, @diasdavid, @alanshaw (js-land),

How do you all feel about making ipfs pin ls not list indirect blocks by default. For context, this is really slow for reasonable datasets as it'll list every block explicitly added to the datastore (all pinned files).

@ghost
Copy link

ghost commented Oct 5, 2018

How about --type=recursive,direct (there's precedent in go-ipfs)

@alanshaw
Copy link
Member

Fine by me 👍

@lidel
Copy link
Member

lidel commented Sep 10, 2020

@aschmahmann just fyi current default is pretty bad for "user perception and devexp" because pin ls slows down with every pin, so it is invisible during dev when repo is empty or has the small number of pins, but may lead to bugs in production like ipfs/ipfs-webui#1618, where having 1k of pins caused pin ls to take 10 seconds.

@lidel lidel added need/triage Needs initial labeling and prioritization and removed status/in-progress In progress labels Sep 10, 2020
@Stebalien Stebalien added effort/hours Estimated to take one or several hours exp/expert Having worked on the specific codebase is important P2 Medium: Good to have, but can wait until someone steps up need/maintainers-input Needs input from the current maintainer(s) and removed need/triage Needs initial labeling and prioritization labels Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/expert Having worked on the specific codebase is important need/maintainers-input Needs input from the current maintainer(s) P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
ipfs/go-ipfs
In Progress
Development

No branches or pull requests

5 participants