fb79a15508
- 添加 sections 定义文件,包含性能优化各领域分类 - 添加规则模板文件,规范文档结构和标签定义 - 添加异步操作优化规则,包括防止瀑布流、并行化、延迟等待等 - 添加包大小优化规则,包括避免桶式导入、动态导入、预加载等 - 添加服务端性能优化规则,包括 API 路
47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
# Sections
|
|
|
|
This file defines all sections, their ordering, impact levels, and descriptions.
|
|
The section ID (in parentheses) is the filename prefix used to group rules.
|
|
|
|
---
|
|
|
|
## 1. Eliminating Waterfalls (async)
|
|
|
|
**Impact:** CRITICAL
|
|
**Description:** Waterfalls are the #1 performance killer. Each sequential await adds full network latency. Eliminating them yields the largest gains.
|
|
|
|
## 2. Bundle Size Optimization (bundle)
|
|
|
|
**Impact:** CRITICAL
|
|
**Description:** Reducing initial bundle size improves Time to Interactive and Largest Contentful Paint.
|
|
|
|
## 3. Server-Side Performance (server)
|
|
|
|
**Impact:** HIGH
|
|
**Description:** Optimizing server-side rendering and data fetching eliminates server-side waterfalls and reduces response times.
|
|
|
|
## 4. Client-Side Data Fetching (client)
|
|
|
|
**Impact:** MEDIUM-HIGH
|
|
**Description:** Automatic deduplication and efficient data fetching patterns reduce redundant network requests.
|
|
|
|
## 5. Re-render Optimization (rerender)
|
|
|
|
**Impact:** MEDIUM
|
|
**Description:** Reducing unnecessary re-renders minimizes wasted computation and improves UI responsiveness.
|
|
|
|
## 6. Rendering Performance (rendering)
|
|
|
|
**Impact:** MEDIUM
|
|
**Description:** Optimizing the rendering process reduces the work the browser needs to do.
|
|
|
|
## 7. JavaScript Performance (js)
|
|
|
|
**Impact:** LOW-MEDIUM
|
|
**Description:** Micro-optimizations for hot paths can add up to meaningful improvements.
|
|
|
|
## 8. Advanced Patterns (advanced)
|
|
|
|
**Impact:** LOW
|
|
**Description:** Advanced patterns for specific cases that require careful implementation.
|