Importing a folder means opening every file and reading its tags. On a large library that is a lot of disk work, and if it happens on the interface thread the application appears to hang.
On a machine that might be on the air, appearing to hang is not acceptable.
Rows first, details after
Folder imports and bulk adds create pending track rows immediately, showing the filename. Tags and duration are extracted on background workers fed through channels.
Completed batches raise an event so the affected rows refresh and the playlist saves. Rows display "Loading…" until their metadata arrives.
The result is that a thousand-file import shows a thousand rows straight away and fills in details progressively. You can start working immediately instead of watching a progress bar.
What is read
Tags are read with TagLib#: title, artist and album, with fallback to the filename when tags are absent or corrupt. Corrupt tags are handled rather than throwing — a library will contain at least a few files with damaged headers, and one of them should not stop an import.
Rendering large lists
Playlist, playlist manager, history, statistics and music library grids all use row and column virtualization with recycling. Only visible rows are realised, and containers are reused as you scroll.
Without this, a 5,000-row library creates 5,000 sets of visual elements and scrolling becomes unusable. With it, list size stops mattering.
Long titles that still fit
A specific problem: a track called "Symphony No. 9 in D minor, Op. 125 — IV. Presto" does not fit a playlist column, and truncating loses the part that identifies it.
Title and artist scroll on overflow — a one-shot animation when text is wider than its viewport, replayed on mouse-over. The text is measured at full width inside a clipped region, so the animation only runs when it is actually needed.
On-Air Mode suspends these animations entirely. Scrolling text is helpful when browsing and unnecessary when broadcasting.