It looks like when downloading chunks, FindChunk() is called, which in turn calls GetFileInfo(): duplicacy/duplicacy_chunkoperator.go at master · gilbertchen/duplicacy · GitHub
From my reading of the code, in this read path, FindChunk() is used to compute the file path + determine if the file exists (via GetFileInfo()).
So my question is: in this code path, is GetFileInfo() necessary? Can the code be optimized to eliminate this call? It seems that the DownloadFile() call will already tell you whether the file exists, via 404 or some other error. Perhaps instead of GetFileInfo(), an eager DownloadFile() could be called optimistically instead.
The reason I ask is because GetFileInfo() makes an API call, which could be billable. In my case, I’m using Dropbox, which doesn’t charge money for API requests but does throttle based on number of API requests per time period. Removing this call would halve the number of API calls and double download throughput.