Django Web Performance
A collection of stuff to improve django web performance.
Domain sharding
Domain sharding is an optimization technique for parallelization of resource loading. If you have a lot of media files on your page you might want them to be downloaded from different domains, as web browsers have limits on how many files they can grab at once. Domain sharding reduces the overall page load time and is widley used on rich media sites, like Facebook, Youtube, etc.
It works as a customized django file storage, overriding standard url method.
Installation & setup
Recommended way to install is pip:
pip install django-webperf
Make sure to change your DEFAULT_FILE_STORAGE in settings.py to use sharding site-wide:
DEFAULT_FILE_STORAGE = 'web_performance.storage.DomainShardingStorage'
Settings
WEBPERF_MEDIA_TEMPLATE
- Default:
'' (empty string)
A pattern to generate media_urls with a standard format placeholder. E.g. http://img{0}.example.com/media/
WEBPERF_DOMAINS_NUMBER
- Default:
2
Number of domains you want to use to split your media content.
Don’t use too many domains, becasue it will increase DNS lookup time.
Metadata
Release files for django-webperf 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-webperf-0.1.tar.gz | 4.0 kB | Without provenance | Details for django-webperf-0.1.tar.gz |
Release files / django-webperf-0.1.tar.gz
| Download URL | django-webperf-0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf24c92c4b4ad34d2653d9e6a90f4b8bfdda5b898a9a51589247ad2f82e6c602
|
|
BLAKE2b-256 checksum How to use checksums |
5562fa443ed31f2f3cc17c782bd3edcc29db30b755087c0291147cde1040101b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-webperf 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.