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

use filepath walk for flatfs query #34

Merged
merged 1 commit into from
Dec 14, 2015

Conversation

whyrusleeping
Copy link
Member

running a query on a large ipfs datastore takes forever (and uses a lot of ram), this should help, some.

}
return query.ResultsWithEntries(q, res), nil
}
if !info.Mode().IsRegular() || info.Name()[0] == '.' {
Copy link
Member

Choose a reason for hiding this comment

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

. but no ..?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the intent of this check was to ignore the random dotfiles that os'es (OSX) will randomly decide to put in folders. Other than that, i'm not certain.

Copy link
Member

Choose a reason for hiding this comment

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

Oh name[0], we're good.
On Sun, Dec 13, 2015 at 22:10 Jeromy Johnson notifications@github.com
wrote:

In flatfs/flatfs.go
#34 (comment):

  • var res []query.Entry
  • prefixes, err := root.Readdir(0)
  • if err != nil {
  •   return nil, err
    
  • }
  • for _, fi := range prefixes {
  •   var err error
    
  •   res, err = fs.enumerateKeys(fi, res)
    
  •   if err != nil {
    
  •       return nil, err
    
  •   }
    
  • }
  • return query.ResultsWithEntries(q, res), nil
    -}
  •       if !info.Mode().IsRegular() || info.Name()[0] == '.' {
    

I think the intent of this check was to ignore the random dotfiles that
os'es (OSX) will randomly decide to put in folders. Other than that, i'm
not certain.


Reply to this email directly or view it on GitHub
https://github.com/jbenet/go-datastore/pull/34/files#r47458423.

@jbenet
Copy link
Member

jbenet commented Dec 13, 2015

this LGTM

jbenet added a commit that referenced this pull request Dec 14, 2015
@jbenet jbenet merged commit 19e39c8 into ipfs:master Dec 14, 2015
@jbenet jbenet mentioned this pull request Dec 14, 2015
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.

2 participants