Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "leapmultix-skill-performance-profiler",
|
||||
"description": "Skill performance-profiler from LeapMultix",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "Julien LE SAUX",
|
||||
"email": "contact@jls42.org"
|
||||
},
|
||||
"skills": [
|
||||
"./skills"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# leapmultix-skill-performance-profiler
|
||||
|
||||
Skill performance-profiler from LeapMultix
|
||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:jls42/leapmultix:leapmultix-marketplace/skills/performance-profiler",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "b709c54ee528e327e6104fd4d52c4d298362e935",
|
||||
"treeHash": "d9b4b45ea162f4475fb215c9aea7acbacdeb8265940af60c0d2997668ee012a5",
|
||||
"generatedAt": "2025-11-28T10:19:13.937412Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "leapmultix-skill-performance-profiler",
|
||||
"description": "Skill performance-profiler from LeapMultix",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "945290d9cdac331d16ac5a05e1481d913e2d4922b76cc0d93048bc04ffb75e0d"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "d1d51d3c5902c62999e5cc4671569dae430d550627a13da845ef8883a33f401a"
|
||||
},
|
||||
{
|
||||
"path": "skills/performance-profiler/SKILL.md",
|
||||
"sha256": "914d0f4d6b13aede083138de83d8212d160dd234328a482e2bf47ad334b3940b"
|
||||
}
|
||||
],
|
||||
"dirSha256": "d9b4b45ea162f4475fb215c9aea7acbacdeb8265940af60c0d2997668ee012a5"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
124
skills/performance-profiler/SKILL.md
Normal file
124
skills/performance-profiler/SKILL.md
Normal file
@@ -0,0 +1,124 @@
|
||||
---
|
||||
name: profiling-performance
|
||||
description: Analyzes and optimizes application performance (loading time, FPS, memory, bottlenecks). Use when experiencing slowdowns, before releases, or optimizing arcade games
|
||||
allowed-tools: Read, Grep, Glob, Bash, WebSearch
|
||||
---
|
||||
|
||||
# Profileur de Performance
|
||||
|
||||
Analyse et optimise performances pour expérience utilisateur fluide (chargement, FPS, mémoire).
|
||||
|
||||
## Table des matières
|
||||
|
||||
- [Quand utiliser](#quand-utiliser)
|
||||
- [Métriques cibles](#métriques-cibles)
|
||||
- [Outils d'analyse](#outils-danalyse)
|
||||
- [Zones de profiling](#zones-de-profiling)
|
||||
- [Patterns essentiels](#patterns-essentiels)
|
||||
- [Workflow](#workflow)
|
||||
- [Checklist](#checklist)
|
||||
- [En cas de doute](#en-cas-de-doute)
|
||||
|
||||
## Quand utiliser
|
||||
|
||||
- Ralentissements dans les jeux
|
||||
- Avant chaque release majeure
|
||||
- Ajout de features lourdes
|
||||
- Optimisation FPS arcade
|
||||
- Investigation memory leaks
|
||||
- Mobile performance
|
||||
|
||||
## Métriques cibles
|
||||
|
||||
**Chargement :** FCP < 1.5s, TTI < 3s, TBT < 200ms
|
||||
**Runtime :** FPS ≥ 60 (arcade), Memory < 50 MB (stable)
|
||||
**Bundle :** Initial < 200 KB (gzipped), Total < 2 MB
|
||||
|
||||
## Outils d'analyse
|
||||
|
||||
**Chrome DevTools Performance :**
|
||||
|
||||
- Profile JS (Scripting), Rendering, Painting
|
||||
- Identifie Long Tasks (> 50ms = problème)
|
||||
- Mesure FPS en temps réel
|
||||
|
||||
**Lighthouse :**
|
||||
|
||||
- Performance > 90, Accessibility > 95, PWA > 90
|
||||
- Identifie bottlenecks chargement
|
||||
|
||||
**Performance API :**
|
||||
|
||||
- `performance.mark()` / `performance.measure()`
|
||||
- `performance.getEntriesByName()` pour résultats
|
||||
|
||||
## Zones de profiling
|
||||
|
||||
### 1. Chargement initial
|
||||
|
||||
- Lighthouse audit → FCP, TTI
|
||||
- Lazy loading modules lourds (trouvé dans lazy-loader.js)
|
||||
- Imports dynamiques existants
|
||||
|
||||
### 2. FPS arcade (< 60 FPS = problème)
|
||||
|
||||
- Trop de calculs dans game loop → cacher résultats
|
||||
- Re-render inutiles → cherche dirty rectangles/layers
|
||||
- DOM excessif → batch avec requestAnimationFrame
|
||||
|
||||
### 3. Memory leaks
|
||||
|
||||
- DevTools Memory → Heap snapshots
|
||||
- Event listeners non nettoyés dans cleanup()
|
||||
- Timers non clearés (setInterval/clearInterval)
|
||||
|
||||
### 4. Bundle size
|
||||
|
||||
- Scripts npm : analyze:dependencies, dead-code
|
||||
- Lazy-loader configuration
|
||||
- Code splitting opportunities
|
||||
|
||||
## Patterns essentiels
|
||||
|
||||
- **Debounce/Throttle :** Événements fréquents
|
||||
- **Memoization :** Cache résultats coûteux
|
||||
- **requestAnimationFrame :** Batch DOM updates
|
||||
- **Lazy loading :** Modules > 50 KB
|
||||
- **Cleanup :** Listeners/Timers en destroy
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **Identifier :** Profile DevTools ou Lighthouse
|
||||
2. **Mesurer :** Taille, FPS, TTI avant optimisation
|
||||
3. **Optimiser :** Une stratégie à la fois
|
||||
4. **Valider :** Re-mesure, seuils atteints, mobile OK
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Lighthouse Performance > 90
|
||||
- [ ] FPS ≥ 60 (arcade)
|
||||
- [ ] Lazy loading implémenté
|
||||
- [ ] Cleanup() nettoyage complet
|
||||
- [ ] Memory leak-free (heap snapshot stable)
|
||||
- [ ] Bundle < 200 KB initial
|
||||
- [ ] Debounce/throttle sur événements
|
||||
- [ ] Assets optimisés
|
||||
|
||||
## En cas de doute
|
||||
|
||||
**Workflow minimal :**
|
||||
|
||||
```bash
|
||||
# Profile avec DevTools ou Lighthouse
|
||||
# Identifier bottleneck (chargement, FPS, mémoire)
|
||||
# Appliquer pattern (lazy loading > debounce > cache)
|
||||
# Mesurer avant/après
|
||||
# Valider sur mobile (bas de gamme)
|
||||
```
|
||||
|
||||
**Règles absolues :**
|
||||
|
||||
1. Profile d'abord, optimiser après
|
||||
2. Mesure avant/après
|
||||
3. Une optimisation à la fois
|
||||
4. Tests passent
|
||||
Reference in New Issue
Block a user