424: File List Optimization

424: File List Optimization

From CodePen Radio by CodePen Blog

April 29, 2026

About this episode

The episode discusses optimizing file lists in the 2.0 Editor using IntersectionObserver for better performance.

The 2.0 Editor can support hundreds of files per Pen, not to mention folders mixed in which don't count toward that total. This can be pretty weighty on the DOM and thus adversely affect performance. Especially as each file/folder has children, a variety of event listeners, are drag and drop enabled, etc. "Virtualizing" data like this is a common approach, but we've found if we just use IntersectionObserver to see if they are visible or not, "freeze" them if they aren't, and fade them in and out of life, it's a great solution. Time Jumps

Topics covered

  • File List Optimization
  • Performance
  • IntersectionObserver
  • Virtualization
  • DOM Management

Keywords

  • file optimization
  • performance
  • IntersectionObserver
  • virtualization
  • DOM
  • event listeners
  • drag and drop

More episodes of CodePen Radio

Explore listener stats, chart rankings, contacts and more on the CodePen Radio podcast page.