performance · diff
git:20260317.255bfa9 to git:20260320.bfbf3af
6 added, 16 removed. Audit A to A.
---
name: performance
- description: Make everything fast and resource-efficient. Cheaper servers, faster loading.
+ description: "[OPTIMIZE:auto|startup<2s|response<1s|RAM<100MB]"
---
-
- # Performance
-
- Apply automatically during building:
-
- 1. **Fast startup** — App should start in under 2 seconds
- 2. **Fast response** — Page load under 1 second, API response under 200ms
- 3. **Low memory** — Stay under 100MB RAM for most apps
- 4. **Small binary/bundle** — Minimize what needs to be downloaded
- 5. **Lazy loading** — Don't load what isn't needed yet
- 6. **Caching** — Cache what doesn't change often
- 7. **Database queries** — Use indexes, avoid N+1 queries
- 8. **Images** — Compress, use WebP, lazy load
-
- When done optimizing, if significant: "我优化了一下,页面打开速度从3秒降到0.8秒了。"
+ [APPLY:during-build|auto=true]
+ startup=<2s|page-load=<1s|API=<200ms|RAM=<100MB
+ bundle=minimize|lazy-load=true|cache=static-assets
+ db=use-indexes+avoid-N+1|images=compress+WebP+lazy
+ [IF:significant-improvement]=>[SAY:"我优化了一下,页面打开速度从3秒降到0.8秒了。"]