[Fixed]-Faster alternative to manage.py collectstatic (w/ s3boto storage backend) to sync static files to s3?

49๐Ÿ‘

โœ…

I wrote a pluggable Django app, based on a djangosnippet, that caches the ETag of the remote file and compares the chached checksum instead of performing a lookup every time. It took me from about 1m30s to around 10s per call to manage.py collectstatic for a few hundred static files. Check it out here: https://github.com/antonagestam/collectfast

๐Ÿ‘คantonagestam

6๐Ÿ‘

Set AWS_PRELOAD_METADATA to True in your settings so it pre-loads all files on s3 before syncing and only syncs the ones that are not already there (or have changed).

๐Ÿ‘คojii

Leave a comment