home / skills / pluginagentmarketplace / custom-plugin-angular / performance
This skill optimizes Angular applications by applying change detection, lazy loading, and bundle strategies to boost performance.
npx playbooks add skill pluginagentmarketplace/custom-plugin-angular --skill performanceReview the files below or copy the command above to add this skill to your agents.
---
name: performance
description: Angular performance optimization, change detection strategies, and bundle optimization
sasmp_version: "1.3.0"
bonded_agent: 05-routing-performance
bond_type: PRIMARY_BOND
---
# Angular Performance Skill
## Overview
Optimize Angular applications for maximum performance through change detection strategies, lazy loading, and bundle optimization techniques.
## Topics Covered
### Change Detection
- OnPush change detection strategy
- ChangeDetectorRef usage
- Zone.js optimization
- Zoneless Angular applications
- Immutable data patterns
### Bundle Optimization
- Tree shaking effectiveness
- Code splitting strategies
- Lazy loading modules
- Preloading strategies
- Bundle analyzer usage
### Runtime Performance
- TrackBy for ngFor
- Virtual scrolling
- Debouncing and throttling
- Memory leak prevention
- Web Workers usage
### Build Optimization
- Production builds
- AOT compilation benefits
- Differential loading
- Source map strategies
- Compression techniques
## Prerequisites
- Angular Core fundamentals
- Module architecture
- Browser DevTools familiarity
## Learning Outcomes
- Implement OnPush change detection
- Optimize bundle sizes
- Profile and fix performance issues
- Build highly performant applications
This skill teaches practical Angular performance optimization techniques focused on change detection strategies, bundle size reduction, and runtime improvements. It helps developers identify bottlenecks, apply targeted fixes, and deliver faster, more efficient Angular applications. The content prioritizes measurable outcomes and production-ready practices.
The skill inspects common performance pain points and provides actionable patterns: adopt OnPush change detection, use ChangeDetectorRef judiciously, and explore zoneless options. It covers build-time optimizations like AOT, differential loading, and compression, plus runtime tactics such as trackBy, virtual scrolling, and Web Worker offloading. Each topic links profiling steps to concrete code changes.
How much improvement can OnPush provide?
OnPush reduces change detection cycles by skipping checks for components without input changes; real gains depend on app structure but are typically significant for component-heavy UIs.
When should I use Web Workers?
Use Web Workers when CPU-intensive tasks block the main thread, such as large data processing or complex calculations that delay UI updates.