2

Issue

I recently connected my Django app to Digital Ocean Spaces using the django-storages library, and suffice it to say I have a lot of static files (currently 2545 files, most of which are small-ish audio files).

I just timed how long it took python3 manage.py collectstatic to run to copy a single static file, and it took 3 minutes 27 seconds. This was the output:

USER@computer dirName % python3 manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings.

This will overwrite existing files!

Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

1 static file copied, 2544 unmodified.

Question

Is there a way to speed the collectstatic process up? Can I tell it which files to collect and copy? Can it somehow interface with git to know which ones to collect and copy?

1 Answer 1

2

I would try using Collectfasta.

The issue is that collectstatic was originally built for use on the local disk, back before cloud storage was mainstream.

Jason Giancono, the author of Collectfasta, wrote a detailed article describing the issue.

Sign up to request clarification or add additional context in comments.

1 Comment

Very nice. What used to take 3 minutes and 27 seconds now takes 8 seconds. It is indeed fasta

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.