Skip to content
Back to skills

Dev Optimize Performance

ASecurity

OPTIMIZE slow Vue applications, fix memory leaks, and improve render performance. Reduce unnecessary re-renders, optimize computed properties, and fix expensive operations. Use when application feels slow, memory usage grows, or animations lag.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
developmenttypescriptgoreactvueperformance

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill dev-optimize-performance --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dev Optimize Performance?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dev Optimize Performance
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-dev-optimize-performance/badge)](https://www.skillsdirectory.com/skills/majiayu000-dev-optimize-performance)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Optimize Performance
description: OPTIMIZE slow Vue applications, fix memory leaks, and improve render performance. Reduce unnecessary re-renders, optimize computed properties, and fix expensive operations. Use when application feels slow, memory usage grows, or animations lag.
---

# Optimize Performance

## Instructions

### Performance Optimization Protocol
When Vue applications are slow or memory usage is high, systematically optimize:

#### 1. Render Performance Issues
- **Identify expensive components** using Vue DevTools performance tab
- **Add `v-memo`** for heavy components that don't need frequent updates
- **Use `shallowRef`** for large arrays/objects that don't need deep reactivity
- **Optimize computed properties** to avoid unnecessary recalculations

#### 2. Memory Leak Detection
- **Check for unmanaged event listeners** in onUnmounted()
- **Cleanup store subscriptions** and async operations
- **Debug timer/interval cleanup**
- **Monitor component reference cycles**

#### 3. Bundle Size Optimization
- **Lazy load components** and routes
- **Tree shake unused imports**
- **Optimize asset loading** with code splitting

## Quick Performance Fixes

### Component Memoization
```vue
<template>
  <!-- Memoize expensive components -->
  <ExpensiveComponent
    v-for="item in items"
    :key="item.id"
    v-memo="[item.id, item.lastModified]"
    :data="item"
  />
</template>

<script setup>
import { shallowRef } from 'vue'

// Use shallowRef for large data structures
const items = shallowRef([])
</script>
```

### Computed Property Optimization
```typescript
// ❌ BAD: Expensive recalculation
const expensiveComputed = computed(() => {
  return heavyCalculation(props.data)
})

// ✅ GOOD: Memoize with caching
const expensiveComputed = computed(() => {
  if (!dataCache.has(props.data.id)) {
    dataCache.set(props.data.id, heavyCalculation(props.data))
  }
  return dataCache.get(props.data.id)
})
```

### Memory Leak Detection
```typescript
const memoryTracker = {
  components: new Set(),
  subscriptions: new Set(),

  track(component, name) {
    this.components.add({ component, name, createdAt: Date.now() })

    onUnmounted(() => {
      this.components.delete(component)
      console.log(`✅ Component cleaned up: ${name}`)
    })
  },

  checkLeaks() {
    const now = Date.now()
    const leaked = Array.from(this.components).filter(c =>
      now - c.createdAt > 30000 // Older than 30 seconds
    )

    if (leaked.length > 0) {
      console.warn('🚨 Potential memory leaks:', leaked)
    }
  }
}
```

This skill activates when you mention performance issues, slow applications, memory leaks, or optimization needs.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.