Angular Modernizer
    Preparing search index...

    Analysis rule plugin-angular:data-handling-strategy: reports inefficient data handling in Angular components and recommends server-side alternatives.

    Detection patterns:

    • large table datasets processed client-side (pagination, filtering, sorting),
    • complex chained data transformations in components,
    • components not connected to server-side pagination.

    This rule identifies common performance anti-patterns where large datasets are processed client-side instead of server-side, which can cause:

    • Slow initial page loads
    • High memory usage
    • Poor user experience on low-end devices
    • Excessive network traffic

    The rule suggests moving operations like filtering, sorting, and pagination to the server when dealing with datasets above the thresholds of DataHandlingStrategyConfig. Components detected as offline-capable (offline libraries, paths, decorators or names) are not reported, since client-side processing is expected there.

    Implements

    Index

    Constructors

    Properties

    category: "runtime-architecture" = 'runtime-architecture'

    Rule category for grouping.

    description: "Detects inefficient data processing strategies and suggests server-side alternatives" = 'Detects inefficient data processing strategies and suggests server-side alternatives'

    Rule description explaining what it checks.

    id: "plugin-angular:data-handling-strategy" = 'plugin-angular:data-handling-strategy'

    Unique rule identifier (scoped to plugin). Format: "plugin-name:rule-name" (e.g., "angular-standalone:component-not-standalone")

    name: "Data Handling Strategy" = 'Data Handling Strategy'

    Human-readable rule name.

    severity: "warning" = 'warning'

    Rule severity level.

    tags: string[] = ...

    Tags for filtering and search.

    Methods

    • Main analysis entry point that runs all data handling strategy checks.

      This method orchestrates multiple detection strategies:

      1. Client-side table processing (large datasets in tables)
      2. Client-side filtering (array.filter() on large arrays)
      3. Client-side sorting (array.sort() on large arrays)
      4. Complex transformations (chained array operations)
      5. Missing server pagination (paginators without server-side logic)

      Each detection method uses functional programming patterns for better testability and maintainability.

      Parameters

      • context: AnalysisContext

        Analysis context containing the source file to analyze

      Returns Promise<AnalysisResult[]>

      Array of violations found in the source file