Freeze when applying a filter with a large member selection

One flat field id with 30,000 distinct members sits in the report filters area. The grid is kept at 3 rows so rendering cannot be confused with the effect.

Steps to reproduce

  1. Open this file in a browser and wait for report ready in the log.
  2. Start a browser profiler recording.
  3. UI path: in the report filters area, open the filter for id, click select all, uncheck 2–3 members, click Apply. The tab is unresponsive for several seconds.
  4. Programmatic path (same filter builder, no clicking): press the button below. It calls setFilter("id", { members: [...] }) with 25,000 of the 30,000 members.
  5. Stop the recording. The time is one synchronous task, almost entirely inside Array.prototype.some() called from the recursive "are all members selected" check (A3() in 2.9.136, t3() in 2.9.115). No network request is involved.

The duration scales with the number of selected members — MEMBER_COUNT and SELECT_COUNT at the top of the script are the knobs. The worst case is a selection covering most but not all members: the check pays the full price and still returns false.

loading…