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