We use storj.io/uplink and storj.io/uplink/edge in the Storj backend for rclone.
I've just discovered in rclone/rclone#7998 that the storj backend is adding over 6MiB to the rclone binary! That is nearly 10% of the binary size. Most backends weigh in at about 200k - it is only the ones with big external SDKs that exceed 1MB and the storj backend is by far the largest.
I suspect that this package is pulling in more things than it needs to which are making its way into the rclone binary.
I used https://github.com/Zxilly/go-size-analyzer to examine the rclone binary and it seems storj.io/common/pb is the biggest culprit. Maybe this could be split up into sub packages per task?
I note that AWS split their SDK up into sub modules to help with this problem. The code all still lives in the same single github repo, but subpackages have their own go.mod and with the new workspaces feature that makes it manageable to work on.
Any thoughts on how to improve this?
Thanks
We use
storj.io/uplinkandstorj.io/uplink/edgein the Storj backend for rclone.I've just discovered in rclone/rclone#7998 that the storj backend is adding over 6MiB to the rclone binary! That is nearly 10% of the binary size. Most backends weigh in at about 200k - it is only the ones with big external SDKs that exceed 1MB and the storj backend is by far the largest.
I suspect that this package is pulling in more things than it needs to which are making its way into the rclone binary.
I used https://github.com/Zxilly/go-size-analyzer to examine the rclone binary and it seems
storj.io/common/pbis the biggest culprit. Maybe this could be split up into sub packages per task?I note that AWS split their SDK up into sub modules to help with this problem. The code all still lives in the same single github repo, but subpackages have their own go.mod and with the new workspaces feature that makes it manageable to work on.
Any thoughts on how to improve this?
Thanks