iterative / PyDrive2

Google Drive API Python wrapper library. Maintained fork of PyDrive.
https://docs.iterative.ai/PyDrive2
Other
565 stars 70 forks source link

fix(fs): remove DVC-specific broken cache optimization #321

Closed shcheklein closed 8 months ago

shcheklein commented 8 months ago

To mitigate https://github.com/iterative/dvc-gdrive/issues/38

It removes the pre-caching logic of root/00, root/01, .... root/ff DVC cache specific directories. It existed to optimize number of API calls, specifically when we use exists calls on the DVC transfer side and we have to do 2x calls in some simple scenarios. It's slower and expensive.

With this PR cache is becoming more general (e.g. we cache all directories we create). It makes sense for fsspec. To make it clear - the whole fsspec implementation in general case is still very broken and it'll be addressed step by step eventually.

The optimization can be turned back on with ad additional "pre_cache_path" argument. But let's do it after we fix the basic GDrive scenario with this one.