Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

angular-performance

/angular-performance

Stosuje techniki optymalizacji Angulara: OnPush, @defer i optymalizację obrazów przy poprawie Core Web Vitals.

Licencja
MIT
Ostatnia zmiana repozytorium
22.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
3
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 22.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Stosuje techniki optymalizacji Angulara: OnPush, @defer i optymalizację obrazów przy poprawie Core Web Vitals.

Oryginalny opis (EN)

Optimization techniques including OnPush, @defer, and Image Optimization. Use when optimizing Angular rendering, deferring blocks, or improving Core Web Vitals.

Jak działa

  1. Priority: P1 (HIGH)
  2. Principles
  3. Guidelines
  4. Anti-Patterns
  5. References
  6. Canonical response anchors
Sekcje z nagłówków SKILL.md, w oryginale · 35 linii, 258 słów
Podgląd SKILL.md
---
name: angular-performance
description: Optimization techniques including OnPush, @defer, and Image Optimization. Use when optimizing Angular rendering, deferring blocks, or improving Core Web Vitals.
metadata:
  triggers:
    files:
    - 'ChangeDetectionStrategy.OnPush'
    keywords:
    - "@defer"
    - NgOptimizedImage
    - runOutsideAngular
    - OnPush
---
# Performance

## **Priority: P1 (HIGH)**

## Principles

- **OnPush**: Always use **ChangeDetectionStrategy.OnPush** on all components. Components should only update when **Signals for state** change or Inputs change.
- **Deferrable Views**: Use **@defer (on viewport)** to lazy load heavy components/chunks below fold. Use triggers: **on interaction**, **on idle**, **when condition**. @defer creates separate **lazy-loaded chunk** automatically. Use **@placeholder** { <Spinner /> } for loading states.
- **Images**: Import **NgOptimizedImage** and replace <img src='...'> with **<img ngSrc='...'** width='800' height='600'>. Add **priority attribute** for LCP images. This enables lazy loading, responsive **srcset**, and preconnect hints automatically.

## Guidelines

- **Zoneless**: Prepare for Zoneless Angular by avoiding **Zone.runOutsideAngular** hacks. Use **Signals for all reactive state** instead. Opt into **provideExperimentalZonelessChangeDetection()**.
- **TrackBy**: Always provide **stable unique identifier** in loops using **@for (item of items; track item.id)** — track expression **replaces trackBy**. This prevents Angular from destroying and recreating DOM nodes.

## Anti-Patterns

- **No function calls in template**: **{{ calculate() }} re-evaluates on every change detection cycle**. Use **computed() signal** or pure pipes to avoid per-cycle re-evaluation as it **caches until dependencies change**.
- **No logic in constructor**: Initialize state in `ngOnInit` or signal effects instead.

## References

- [Defer Usage](references/defer-usage.md)

## Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:
- caches until dependencies change
- computed() signal
- priority attribute
- re-evaluates on every change detection
- replaces trackBy
- srcset

- Additional task-grounded exact anchors: Signals for state; @for (item of items; track item.id); stable unique identifier
Pliki w paczce (3)
  • SKILL.md 2 KB
  • evals/evals.json 4 KB
  • references/defer-usage.md 1 KB

Wersje

W bazie nie ma innych skilli o nazwie angular-performance.

Migawka bazy z 13.11.2026 · wersja paczki 1ebe91e93dc9 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100web-performance-optimization
    Optymalizuje wydajność aplikacji Angular 21: Core Web Vitals, rozmiar paczek, lazy loading i SSR, zawsze po pomiarze.
  • 96angular-conventions
    Opisuje nowoczesne standardy pisania kodu w Angular 18 i nowszych: sygnały, komponenty standalone, OnPush i wbudowane przepływy sterowania.
  • 80Angular OnPush Host Bindings v18
    Przegląda komponenty OnPush z wiązaniami hosta po wersji 18, gdy stan lub callbacki nie odświeżają widoku tak, jak trzeba.
  • 100angular-idioms
    Opisuje idiomatyczną architekturę Angular 19+: sygnały, komponenty standalone, wstrzykiwanie zależności, detekcję zmian OnPush i integrację z RxJS przy tworzeniu i refaktoryzacji aplikacji.
  • 100angular-components
    Buduje komponenty standalone Angular z wejściami Signals, zmianą detekcji OnPush, przepływem kontroli @if/@for i wzorcem smart-dumb.
  • 95angular-best-practices
    Zbiera dobre praktyki optymalizacji wydajności Angulara przy pisaniu, przeglądzie i refaktoryzacji kodu pod kątem szybkości, rozmiaru paczki i wydajności renderowania.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.