跳到正文
Skillpedia
部署与云(DevOps)48k · #5431

performance-profiling

它能做什么

这个工具可以帮你找到并修复导致网站和应用变慢的问题。它会测量性能、找出变慢的原因,并给出修复建议。

适用场景

  • ✓你的网站加载很慢。
  • ✓你应用里的操作出现卡顿。
  • ✓你想确保网站对所有用户都保持流畅。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/performance-profiling/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我分析一下我网站的性能,网址是 https://mysite.com”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会用一些程序测量你网站的加载速度、响应速度和稳定性。然后,它会指出哪些部分需要改进,比如减小文件体积或优化代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.
常见问题

什么是“Core Web Vitals”?

这是一组关键指标,用来衡量页面加载、交互性和视觉稳定性方面的用户体验。

包体积优化和运行时优化有什么区别?

包体积优化侧重于减小浏览器需要下载的文件大小。运行时优化侧重于让代码在下载之后运行得更快。

“瓶颈”是什么意思?

瓶颈是指网站或应用中导致最多卡顿、限制整体性能的那个部分。

详情

作者的原始描述

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

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5431
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能