Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasydong/django_optimise_demo
https://github.com/dasydong/django_optimise_demo
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/dasydong/django_optimise_demo
- Owner: DasyDong
- Created: 2018-01-03T09:11:59.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T00:43:53.000Z (almost 2 years ago)
- Last Synced: 2023-03-07T01:31:10.297Z (over 1 year ago)
- Language: Python
- Size: 223 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Performance Optimization For A Web Project
This repo contains initial django project code example in 'master' branch
And optimization code in 'optimise' branch
用 factory-boy 生成10万个房屋的实例
优化主要是两方面:
1 优化数据库查询
select_related()
only()
2 优化代码
自定义序列化
升级basehash
用 Silk包 做性能分析, silk可以查看请求耗时, 数据库查询耗时, 和数据库查询次数,是很棒的工具