Page MenuHomeSoftware Heritage

fs: make FuseDirEntry slicable
AbandonedPublic

Authored by haltode on Oct 30 2020, 10:12 AM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

This makes readdir() O(N) instead of O(N²) because we do not go through all
entries every time, but only those after the readdir() offset.

Diff Detail

Repository
rDFUSE FUSE virtual file system
Branch
feature/fuse-dir-slice
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16794
Build 25894: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 25893: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4389 (id=15518)

Rebasing onto f9de49aca7...

Current branch diff-target is up to date.
Changes applied before test
commit 7c180d5601f240c1b7a00d3c24f868b5b07ffe3a
Author: Thibault Allançon <haltode@gmail.com>
Date:   Fri Oct 30 10:10:02 2020 +0100

    fs: make FuseDirEntry slicable
    
    This makes readdir() more efficient because we do not go through all
    entries every time, but only those after the readdir() offset.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/132/ for more details.

Rework commit message: efficient => O(n²) to O(n)

Build is green

Patch application report for D4389 (id=15519)

Rebasing onto f9de49aca7...

Current branch diff-target is up to date.
Changes applied before test
commit ca2e3160fb99caf8e056fd53876e6127147d7996
Author: Thibault Allançon <haltode@gmail.com>
Date:   Fri Oct 30 10:10:02 2020 +0100

    fs: make FuseDirEntry slicable
    
    This makes readdir() O(N) instead of O(N²) because we do not go through
    all entries every time, but only those after the readdir() offset.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/133/ for more details.

Replace aiter with get_entries().

Build is green

Patch application report for D4389 (id=15559)

Rebasing onto 34eed7bc90...

First, rewinding head to replay your work on top of it...
Applying: fs: make FuseDirEntry slicable
Changes applied before test
commit 6bf9794dcbbb79160b66c363a56dd0105d81b6e3
Author: Thibault Allançon <haltode@gmail.com>
Date:   Fri Oct 30 10:10:02 2020 +0100

    fs: make FuseDirEntry slicable
    
    This makes readdir() O(N) instead of O(N²) because we do not go through
    all entries every time, but only those after the readdir() offset.
    
    Replace the iterator protocol `__aiter__() -> AsyncIterator[FuseEntry]`
    with a new method `get_entries(offset: int) -> List[FuseEntry]`.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/134/ for more details.

  • Remove useless line
  • Rebase on master

Build has FAILED

Patch application report for D4389 (id=15560)

Rebasing onto 34eed7bc90...

Current branch diff-target is up to date.
Changes applied before test
commit a0511b010cc6e07d3ead40f69911a0e16e4058fb
Author: Thibault Allançon <haltode@gmail.com>
Date:   Fri Oct 30 10:10:02 2020 +0100

    fs: make FuseDirEntry slicable
    
    This makes readdir() O(N) instead of O(N²) because we do not go through
    all entries every time, but only those after the readdir() offset.
    
    Replace the iterator protocol `__aiter__() -> AsyncIterator[FuseEntry]`
    with a new method `get_entries(offset: int) -> List[FuseEntry]`.

Link to build: https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/135/
See console output for more information: https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/135/console

Fix typing and rework commit message

Build is green

Patch application report for D4389 (id=15561)

Rebasing onto 34eed7bc90...

Current branch diff-target is up to date.
Changes applied before test
commit bed06c7588938f6e8d26a827f450a130f78dab0d
Author: Thibault Allançon <haltode@gmail.com>
Date:   Fri Oct 30 10:10:02 2020 +0100

    fs: replace __aiter__() with get_entries(offset: int)
    
    This makes readdir() O(N) instead of O(N²) because we do not go through
    all entries every time, but only those after the readdir() offset.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/136/ for more details.

Use generators instead of list.

Build is green

Patch application report for D4389 (id=15565)

Rebasing onto 34eed7bc90...

Current branch diff-target is up to date.
Changes applied before test
commit 07a250e0452f170a05577cca0451a7dcc9e5ec32
Author: Thibault Allançon <haltode@gmail.com>
Date:   Fri Oct 30 10:10:02 2020 +0100

    fs: add get_entries(offset: int) in addition of __aiter__
    
    This makes readdir() O(N) instead of O(N²) because we do not go through
    all entries every time, but only those after the readdir() offset.

See https://jenkins.softwareheritage.org/job/DFUSE/job/tests-on-diff/137/ for more details.

This has been integrated in D4345 since slicing cannot improve complexity on its own (the list is built everytime).