Quadratic in the sense that, in the worst case, you have N programs sharing the same set of M dependencies, requiring N*M components worth of space. With sharing, it would only be N+M.
In any case I don’t think library duplication is a meaningful issue in most cases. As evidenced by everyone using Docker which duplicates libraries!
Feels like this could be totally solved at the filesystem level with copy-on-write de-duplication. The best of both worlds!
Docker's way of doing things is basically an admittance of defeat by lazy engineers. We can do better than that.