5 ms·
(Googler, opinions are my own). I also don't work on drive, these are my rough understanding of things. There may not be a way to do this yet, but hopefully s
by kyrra 6y ago
(Googler, opinions are my own). I also don't work on drive, these are my rough understanding of things.
There may not be a way to do this yet, but hopefully should be coming someday. One key thing to understand is that Google Drive seems to be implemented as a graph, not a tree. This becomes apparent when you realized that any item (folder or file) could be placed into multiple directories on your drive. This allowed for cycles and lots of other crazy things within the filesystem (as you aren't guaranteed to have a single parent folder).
Now, this behavior finally changed in Sept 2020[1], and they are backfilling all mutli-links to be shortcut (symlink) based. This should finally allow for proper directory navigation and determining size. It also fixes all kinds of other problems that a graph file system causes.
[1] https://cloud.google.com/blog/products/g-suite/simplifying-google-drives-folder-structure-and-sharing-models https://cloud.google.com/blog/products/g-suite/simplifying-g...
- CarelessExpert 6y ago> This allowed for cycles and lots of other crazy things within the filesystem (as you aren't guaranteed to have a single parent folder). That doesn't prevent a folder size calculation. It does mean you need to do a graph traversal, and you might need to supplement the feature with a visualization akin to what you get from windirstat/baobab/etc, so users know what's factoring into the calculation. It also likely means this isn't an instantaneous operation, but again, I look at windirstat/baobab as examples for how to present a UX that's workable. But that doesn't prevent the feature from being built, and the fact that rclone already has it says to me the gdrive team has simply chosen not to make this functionality available.
- kyrra 6y agoI agree that it doesn't prevent it. Traversing a graph is a simple compsci problem, but optimizing it is more complicated. My guess is that it prevent caching of folder sizes, so any size checks require full graph walks, which are not cheap.
- kyrra 6y agoAnother complication I thought of: permissions. While this may not matter as much for consumer drive product, for Google Drive within an organization, permissions are per object. So 2 people looking at the same folder may see different content. This impacts folder-size, as any given person may only see a subset of the content within a folder.
- deepl_derber 6y agoI think it stands to reason that if computing folder sizes was a trivial thing to implement the Drive folks would've done it by now. It's obviously useful.
- CarelessExpert 6y agoIt equally stands to reason that by not offering this feature, they make it more difficult for users to manage their quota, which means they can drive folks to higher-priced plans. This would be the "malice" take. Given Google's history with UX and support of existing products, the other possibility is the product is simply understaffed/undermaintained and poorly managed. This is the "incompetence" take. And again, to emphasize: rclone can do this today. Is it a bit slow (and possibly limited)? Absolutely. But it works, and is how I've turned to managing my own gdrive quota since Google seems to be either unwilling or incapable of offering the functionality themselves.
- deepl_derber 6y agoI disagree - rclone can solve a substantially simpler and different problem (i.e. computing the size of a specified hierarchy on-demand). Being able to store and produce sizes of arbitrary folders in Drive for however many millions of users in a reasonable time frame is a substantially more challenging problem, and what we're talking about here. Google probably hasn't provided the on-demand version of this because it's trivial to script with their API. Given that Google does offer you tools for managing your quota, and knowing it's a very difficult problem to solve, I'm disinclined to believe this is malicious or incompetent.