Skip to content

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.

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