The Real Fullstack

The Frozen Interface

The code uses async and signals everywhere. So why can't the user even scroll while the report updates?

Ingeniero8 minLaboratorio de rendimientoSimulador de línea de tiempo
angularbrowser-apistypescriptweb-workers

Este reto aún no está traducido al Español. Estás leyendo la versión en inglés.

Misión:Bring the interaction delay (INP estimate) under 200 ms while results still appear within 1.1 seconds.Contexto · Objetivos de aprendizaje ▾

Quillfin's risk report shows 10,000 positions. Every filter change re-sorts and re-formats all rows, then renders the whole table. Users click, nothing happens, they click again — and the page responds to both clicks a second later.

Misión: Bring the interaction delay (INP estimate) under 200 ms while results still appear within 1.1 seconds.

Objetivos de aprendizaje

  • Explain why long tasks block input even in async code.
  • Move or split CPU work: Web Workers and yielding.
  • Reduce DOM work with virtual scrolling.
SimulaciónSimulado

Ejecuta la simulación para ver la salida.

Ejecutar simulación
onFilterChange(filter: Filter) {  // 900 ms of sorting and formatting on the main thread …  const rows = this.allRows.filter((r) => matches(r, filter)).sort(byRisk).map(format);  this.rows.set(rows);   // … then 10,000 table rows rendered at once}

Simplificación

One compute task and one render task with fixed costs. Real INP also includes style, layout and paint, and varies by device. Modelo educativo: los números ilustran un comportamiento, no son benchmarks.

Conceptos

Útil antes de este

Retos relacionados

Referencias