-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip uploading unchanged files #23
Comments
hmm... checksum for the file path or content? If for path what happens if the file content changes? If for content then downloading the files will negate the gains of not uploading the files. |
It's the checksum of the file content, not the path. Downloading would negate this, but you don't have to download the files to calculate the hash. Bunny.net has already calculated the checksums for every file, and exposes them via the API. You can query the "List files" API endpoint above to read the checksum for every single file in a directory in a single request. The response looks like this: |
Oh, I see. Makes sense. I would be happy if you provide a PR for that. Let me know if you have any questions. |
Sorry, I'm actually not going to open a PR for this - I still think it's quite doable, but after running into other issues with Bunny Storage, I've refactored my deployment strategy to publish content directly to a backend server instead, and connect a pull zone to that to populate the CDN, without using storage at all. Sorry! I'll leave this open anyway in case anybody else is interested in taking this on in future. |
Since you fixed my previous issue so quickly, I thought it might be worth adding a more complicated one 😄.
I have a fairly large site (325MB - it includes some videos etc) that I want to deploy to BunnyCDN and it can take a while. I'd like to speed this up.
I think there's a good approach to do this by extending the approach here:
This would be useless when used with
remove
(since that clears the existing content first) but it's technically possible to extend this later to do removal en route as well (by comparing the existing content with the uploaded files, and individually deleting any extra content afterwards).My best-guess calculations suggest this would reduce the time to do large deploys like mine with only small changes from ~10 minutes to ~10 seconds (i.e. 60x faster).
Would you be open to that? I'm happy to open a PR to add this feature myself, if that's something you might accept.
The text was updated successfully, but these errors were encountered: