Dev.Lib
arrow_backBack to Blogs
LEVEL_099.1June 27, 20261 min read

First Input Delay (FID)

Performance Metrics

FID measures delay from first user input to event handler start — main thread busy (long tasks) inflates it.

Summary

FID measures delay from first user input to event handler start — main thread busy (long tasks) inflates it. Legacy metric — replaced by INP but still in field data historically. Reduce JS at load, break up long tasks, defer third parties. Target context in performance checklist.

Code example

new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    console.log('FID ms:', entry.processingStart - entry.startTime);
  }
}).observe({ type: 'first-input', buffered: true });

Key points

  • FID measures delay from first user input to event handler start — main thread busy (long tasks) inflates it.
  • Legacy metric — replaced by INP but still in field data historically.
  • Reduce JS at load, break up long tasks, defer third parties.
  • Target context in performance checklist.

Further reading

Related concepts