You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenDAL's Google Drive backend now supports efficient batch recursive listing, improving performance by ~280x compared to the previous implementation. This issue tracks when rustic_core can benefit from this improvement.
Problem
When using rustic with Google Drive via OpenDAL (opendal:gdrive), operations like repoinfo, check, or backup were extremely slow compared to using rclone:gdrive.
Root cause: OpenDAL's generic FlatLister made one API call per directory. For a repository with 256 data/XX/ subdirectories + other dirs, this meant ~260+ sequential API calls.
Solution (implemented in OpenDAL)
A custom GdriveFlatLister was implemented that uses Google Drive's OR query syntax to batch multiple directory lookups:
('id1' in parents or 'id2' in parents or 'id3' in parents ...)
This is the same approach rclone uses for its ListR implementation.
Performance Results
Tested with rustic repoinfo against a real Google Drive repository (~2100 files, 130 GiB):
Metric
Before
After
Improvement
Scanning time
14 minutes
3 seconds
~280x faster
API calls
~260+
~12
~20x fewer
Dependencies
This improvement requires two OpenDAL PRs to be merged and released:
Summary
OpenDAL's Google Drive backend now supports efficient batch recursive listing, improving performance by ~280x compared to the previous implementation. This issue tracks when rustic_core can benefit from this improvement.
Problem
When using rustic with Google Drive via OpenDAL (
opendal:gdrive), operations likerepoinfo,check, orbackupwere extremely slow compared to usingrclone:gdrive.Root cause: OpenDAL's generic
FlatListermade one API call per directory. For a repository with 256data/XX/subdirectories + other dirs, this meant ~260+ sequential API calls.Solution (implemented in OpenDAL)
A custom
GdriveFlatListerwas implemented that uses Google Drive's OR query syntax to batch multiple directory lookups:This is the same approach rclone uses for its
ListRimplementation.Performance Results
Tested with rustic
repoinfoagainst a real Google Drive repository (~2100 files, 130 GiB):Dependencies
This improvement requires two OpenDAL PRs to be merged and released:
fix(services/gdrive): include size and modifiedTime in list() metadata apache/opendal#7058 -
fix(services/gdrive): include size and modifiedTime in list() metadatafeat(services/gdrive): implement batch recursive listing for ~200x performance improvement apache/opendal#7059 -
feat(services/gdrive): implement batch recursive listingTimeline
Related Issues
list()returns size=0 for all files - missing size field in API call and metadata mapping apache/opendal#7057 - Original bug report for missing metadataNotes
For users who need this fix now, you can use a patched OpenDAL version by adding to your
Cargo.toml:This branch includes both the metadata fix and the performance improvement.