Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / Are there any recommended best practices

Are there any recommended best practices

New Discussion
Sofia Verniga Customer
Sofia Verniga Customer asked on May 26, 2026 4:35 PM

Are there any recommended best practices for optimizing memory management and preventing cache bloat in high-performance web applications?

Sign In to post a reply

Replies

  • 0
    Riva Ivanova
    Riva Ivanova answered on May 27, 2026 9:59 AM

    Hello,

    I have been looking into your question, and for high‑performance Angular apps (especially those using feature‑rich UI libraries like Ignite UI for Angular), the best wins usually come from reducing what you ship, rendering only what’s visible, and persisting only the minimum state you actually need.

    Below are some recommendations, along with links to our documentation for further details and examples.

    1) Keep CSS payload small (prevents “cache bloat” from huge stylesheets)

    1.1) Exclude unused component themes at build time

    Ignite UI’s theming engine can generate a stylesheet that includes all component themes, but the docs explicitly recommend optimizing this by excluding the ones you don’t use (which reduces the CSS that ends up cached by the browser).

    • The @include theme() mixin supports an $exclude parameter so you can omit unused component themes.
    • The library exposes a $components map to help you compute exclusions based on what you actually include.

    1.2) Route-level (lazy) theming for heavy components

    If a “heavy” component (e.g., TreeGrid) exists on only one route, you can lazy-load that route and move the component theme into the route/component stylesheet so it’s not part of the initial cached CSS. This approach reduces top-level CSS dramatically and only delivers the heavier grid styles when the user navigates to that feature area.

    Customizing Ignite UI for Angular Theming

    2) Reduce JS bundle size via multiple entry points + code splitting (smaller cached JS)

    Starting with v21.0.0, Ignite UI for Angular supports multiple entry points, enabling better tree-shaking, code splitting, and lazy loading so you only ship what you use.

    2.1) Import from the most specific entry point

    Instead of importing everything from igniteui-angular, the docs recommend importing from specific entry points, such as:

    • igniteui-angular/grids/grid
    • igniteui-angular/input-group
    • igniteui-angular/core (for utilities/services)

     

    This reduces initial bundle size and improves load performance because modern bundlers can eliminate unused code more effectively.

    2.2) Combine entry points with Angular lazy loading

    Pairing the entry point architecture with Angular lazy loading further reduces initial bundle weight.

    Code Splitting and Multiple Entry Points

    Additionally, since the grids are quite complex and feature-rich components, some grid-specific recommendations can improve the performance:

    3) Prevent memory growth in data-heavy views with Grid virtualization

    If your application renders large tables/lists, the DOM size becomes a major memory driver. Ignite UI’s IgxGrid virtualizes content vertically and horizontally using igxForOf, rendering only what is visible in the viewport and swapping data as the user scrolls.

    Best practices to ensure virtualization stays effective:

    • Keep grid dimensions constrained (default is width/height 100%). Virtualization activates when content can’t fit, and scrollbars are needed.
    • Avoid setting grid width or height to null unless you intentionally want all rows/columns rendered (which increases DOM and memory).

    Angular Grid Virtualization and Performance

    4) Avoid browser storage “bloat” when persisting grid state

    Ignite UI provides igxGridState for saving/restoring grid state via getState(), and setState(), and storing the serialized state string can be done in storage such as sessionStorage/localStorage.

    You can pass feature names (or a list of features) to getState() to retrieve only parts of the state (e.g., sorting/filtering) rather than everything. Also, the directive supports an options object that lets you disable tracking for specific features, ensuring they’re not included in saved state and therefore not inflating stored payloads.

    Angular Grid State Persistence

    Please let me know if you need any further information regarding this matter.

    Sincerely,
    Riva Ivanova
    Software Developer
    Infragistics

  • 0
    Hurry Kang
    Hurry Kang answered on Jun 18, 2026 8:02 AM

    Thank you for sharing these insightful best practices! I found the emphasis on user experience particularly valuable, as enhancing usability truly elevates application performance. Looking forward to implementing these strategies! level devil

  • 0
    Max Johnson
    Max Johnson answered on Jun 18, 2026 10:55 AM

    Great question. In my experience, keeping cache sizes bounded, setting sensible TTLs and using proper eviction policies are some of the most effective ways to prevent memory issues in high-performance applications. Monitoring memory usage regularly and avoiding unnecessary caching can make a huge difference as systems scale. I was also browsing win zoria recently and it reminded me how important it is to balance performance with maintainability.

  • 0
    eagle sky
    eagle sky answered on Aug 5, 2026 7:19 AM

    This article shares quite a few useful tips on optimizing performance when working with big data. After handling tasks like this, I often unwind with the game Block Blast, as the gameplay is simple yet highly engaging.

  • 0
    Alishba Kashif
    Alishba Kashif answered on Oct 4, 2026 9:01 AM

    Great question. Using efficient caching strategies, setting proper expiration and eviction policies, monitoring memory usage, and removing unused objects or stale cache entries can help prevent cache bloat. Profiling and performance monitoring tools are also useful for finding memory leaks. These practices can help websites like County Obituaries maintain fast page loading and efficient resource management.

  • 0
    Norma RCannon
    Norma RCannon answered on Oct 28, 2026 7:09 AM

    Thank you so much

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Sofia Verniga Customer
Favorites
0
Replies
6
Created On
May 26, 2026
Last Post
4 weeks ago

Suggested Discussions

Tags

No tags

Created on

May 26, 2026 4:35 PM

Last activity on

May 26, 2026 4:35 PM