Skip to content

PERF004: large-view

View has more than max-components components

Code PERF004
Name large-view
Category Performance (PERF)
Default severity info
Enabled by default no
Fix available no
ign-lint equivalent none

Reports a view with more than max-components components (the root container included).

Every component is a property tree on the gateway and a set of DOM elements in each session that shows the view. Very large views load slowly, use memory per session and are hard to change. Repeated parts are better as an embedded view or a flex repeater.

A view with 600 labels and LEDs laid out by hand.

Use instead: one small view per repeated element, shown by a flex repeater over a list of parameters.

  • max-components (default 300): the largest allowed number of components.

Set in [rules.PERF004] of iglint.toml (or [tool.iglint.rules.PERF004] in pyproject.toml).

Option Type Default Description
max-components integer 300 Largest allowed number of components in a view.

Generated from the rule metadata by iglint generate-docs; iglint rule PERF004 prints the same page in the terminal. Source: docs/rules/PERF004.md.