- 使用 Django ORM 的
select_related和prefetch_related优化关联对象的查询性能。 - 使用 Django 的缓存框架及后端支持(如 Redis 或 Memcached)来减少数据库负载。
- 实现数据库索引和查询优化技术以获得更好的性能。
- 对 I/O 密集型或长时间运行的操作使用异步视图和后台任务(通过 Celery)。
- 使用 Django 的静态文件管理系统(如 WhiteNoise 或 CDN 集成)优化静态文件处理。
- 在开发的每个阶段都优先考虑安全和性能优化。
Django Best Practices Performance Optimization
在项目的所有文件中专注于性能优化技术。
Django Best Practices Performance Optimization by liaosw97 · 02bcc9c
npx skillmds@latest add liaosw97/django-best-practices-performance-optimization File contents
---name: django-best-practices-performance-optimizationdescription: 在项目的所有文件中专注于性能优化技术。---- 使用 Django ORM 的 `select_related` 和 `prefetch_related` 优化关联对象的查询性能。- 使用 Django 的缓存框架及后端支持(如 Redis 或 Memcached)来减少数据库负载。- 实现数据库索引和查询优化技术以获得更好的性能。- 对 I/O 密集型或长时间运行的操作使用异步视图和后台任务(通过 Celery)。- 使用 Django 的静态文件管理系统(如 WhiteNoise 或 CDN 集成)优化静态文件处理。- 在开发的每个阶段都优先考虑安全和性能优化。
liaosw97/awesome-rules-skills/tree/main/plugins/django/skills/django-best-practices-performance-optimization commit 02bcc9c13b
Frequently asked questions
Run npx skillmds@latest add liaosw97/django-best-practices-performance-optimization in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
在项目的所有文件中专注于性能优化技术。 It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.