Related Issues (20)
- Django批量更新对象时,利用bulk_update减少耗时 HOT 1
- 当 MySQL 版本较低时(<5.7),谨慎使用 DateTimeField 进行排序
- 在数据量较大的场景下,需要在结构的便利性和性能中做平衡 HOT 1
- Django update_or_create时将更新字段放置在defaults里
- 用values或value_list方法提取想要的数据 HOT 1
- 利用Django的缓存减少数据库的查询
- 对数据库外键,使用Django select_related查询,大大减少数据库请求的次数。
- 监控团队Golang实践 HOT 3
- 不要使用可变类型作为默认参数 HOT 3
- 对条件判断,在不需要提前返回的情况下,尽量推荐使用正判断, 更容易让人理解
- 列表推导或内联函数使代码更清晰简洁
- 当在非测试代码中使用到 assert 时,请妥善添加断言信息
- redis的List数据结构高频插入数据最佳实践
- 在协程中使用 `asyncio.sleep()` 代替 `time.sleep()`
- 使用 `timedelta.total_seconds()` 代替 `timedelta.seconds` 获取相差总秒数
- 善用 lua 脚本保证多条 Redis 操作指令的原子性
- Django 使用 get_or_create 方法时需要保证查询字段唯一性约束 HOT 2
- 在数据量较大的场景下,避免使用 Model Serializer
- Python对于时间的处理,建议使用Arrow,可以节省大部分的思考时间
- 在有分支判断时使用 yield 要记得及时 return
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from best-practices.