Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)48k · #5431

performance-profiling

Skill này làm gì

Công cụ này giúp tìm và sửa các vấn đề làm website và ứng dụng chậm. Nó đo hiệu suất, xác định nguyên nhân gây chậm và đề xuất cách khắc phục.

Khi nào nên dùng

  • ✓Khi website của bạn tải chậm.
  • ✓Khi các tương tác trong ứng dụng bị lag.
  • ✓Khi bạn muốn đảm bảo trang của mình nhanh cho mọi người dùng.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/performance-profiling/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/performance-profiling/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Phân tích hiệu suất của website tôi tại https://mysite.com”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng các chương trình để đo tốc độ tải, khả năng phản hồi và độ ổn định của trang bạn. Sau đó, nó chỉ ra những phần cần cải thiện, như giảm kích thước tệp hoặc tối ưu mã.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Performance Profiling

Measure, analyze, optimize - in that order.

🔧 Runtime Scripts

Execute these for automated profiling:

Script Purpose Usage
scripts/lighthouse_audit.py Lighthouse performance audit python scripts/lighthouse_audit.py https://example.com

1. Core Web Vitals

Targets

Metric Good Poor Measures
LCP < 2.5s > 4.0s Loading
INP < 200ms > 500ms Interactivity
CLS < 0.1 > 0.25 Stability

When to Measure

Stage Tool
Development Local Lighthouse
CI/CD Lighthouse CI
Production RUM (Real User Monitoring)

2. Profiling Workflow

The 4-Step Process

1. BASELINE → Measure current state
2. IDENTIFY → Find the bottleneck
3. FIX → Make targeted change
4. VALIDATE → Confirm improvement

Profiling Tool Selection

Problem Tool
Page load Lighthouse
Bundle size Bundle analyzer
Runtime DevTools Performance
Memory DevTools Memory
Network DevTools Network

3. Bundle Analysis

What to Look For

Issue Indicator
Large dependencies Top of bundle
Duplicate code Multiple chunks
Unused code Low coverage
Missing splits Single large chunk

Optimization Actions

Finding Action
Big library Import specific modules
Duplicate deps Dedupe, update versions
Route in main Code split
Unused exports Tree shake

4. Runtime Profiling

Performance Tab Analysis

Pattern Meaning
Long tasks (>50ms) UI blocking
Many small tasks Possible batching opportunity
Layout/paint Rendering bottleneck
Script JavaScript execution

Memory Tab Analysis

Pattern Meaning
Growing heap Possible leak
Large retained Check references
Detached DOM Not cleaned up

5. Common Bottlenecks

By Symptom

Symptom Likely Cause
Slow initial load Large JS, render blocking
Slow interactions Heavy event handlers
Jank during scroll Layout thrashing
Growing memory Leaks, retained refs

6. Quick Win Priorities

Priority Action Impact
1 Enable compression High
2 Lazy load images High
3 Code split routes High
4 Cache static assets Medium
5 Optimize images Medium

7. Anti-Patterns

❌ Don't ✅ Do
Guess at problems Profile first
Micro-optimize Fix biggest issue
Optimize early Optimize when needed
Ignore real users Use RUM data

Remember: The fastest code is code that doesn't run. Remove before optimizing.

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp

“Core Web Vitals” là gì?

Đây là các chỉ số quan trọng đo trải nghiệm người dùng về tải trang, khả năng tương tác và độ ổn định hình ảnh.

Khác nhau giữa tối ưu kích thước bundle và tối ưu runtime là gì?

Tối ưu kích thước bundle tập trung giảm dung lượng các tệp mà trình duyệt tải về. Tối ưu runtime tập trung làm mã chạy nhanh hơn sau khi đã được tải.

“Bottleneck” nghĩa là gì?

Bottleneck (điểm nghẽn) là phần của website hoặc ứng dụng gây chậm nhiều nhất, hạn chế hiệu suất chung.

Chi tiết

Mô tả gốc của tác giả

Performance profiling principles. Measurement, analysis, and optimization techniques.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5431
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự