audeering / audbackend

Manage file storage on different backends
https://audeering.github.io/audbackend/
Other
3 stars 0 forks source link

Speedup audbackend.interface.Maven.ls() #226

Closed hagenw closed 1 month ago

hagenw commented 1 month ago

In its current implementation, the execution time of audbackend.interface.Maven.ls() scales with the content of the repository / sub-folder, as it first collects all files given under root or a sub-folder, and limits the results only afterwards for the requested file.

As all versioned belonging to a file are stored in the the sub-folder <root>/<name>/ there is no need for this. In this pull request, I use ls() of the underlying backend object to inspect the content of that folder and hence speed up the execution time.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.0%. Comparing base (bdc5368) to head (8aa9d92).

Additional details and impacted files | [Files](https://app.codecov.io/gh/audeering/audbackend/pull/226?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering) | Coverage Δ | | |---|---|---| | [audbackend/core/interface/maven.py](https://app.codecov.io/gh/audeering/audbackend/pull/226?src=pr&el=tree&filepath=audbackend%2Fcore%2Finterface%2Fmaven.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=audeering#diff-YXVkYmFja2VuZC9jb3JlL2ludGVyZmFjZS9tYXZlbi5weQ==) | `100.0% <100.0%> (ø)` | |
hagenw commented 1 month ago

This is also the one advantage we have with the Maven interface, compared to the Versioned interface, as in Versioned we cannot limit the listing of files that easily.