Skip to main content
Avid Contributor III
April 10, 2026

Indexing Music Library

  • April 10, 2026
  • 22 replies
  • 201 views

My app for backing up my music takes about 3 minutes.  Indexing my library in Sonos app takes an hour and a half?  How come it takes so long?

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

22 replies

Airgetlam
April 10, 2026

As a guess, it may have to do with the CPU doing the processing, in conjunction with available RAM, where it may be doing swapping. Scanning data is certainly a different operation than a backup. 

Bruce
Stanley_4
Grand Maestro
April 10, 2026

How many of the internal tags does your backup process?

How many indexes does it generate so you can search your music based on them?

How many cores, how much speed, how much memory in your backup device versus your Sonos?

 

Might go faster if you did the indexing from your most capable Sonos device. 

MoPac
Headliner III
April 10, 2026

Does Sonos choose the “Associated Product” ( The product that takes the index ) by looking for the most qualified product to execute that function?

Stanley_4
Grand Maestro
April 10, 2026

Been a long time since I saw the Sonos position on this.

Originally it was the associated device, then I think it was tweaked so that if the associated device was underpowered it would move the indexing to a  more powerful device. I don't recall any details on when the switch was done. Also haven't seen anything recently so it may not be in the new app.

Edit, also don't know how you'd tell where it was being done, maybe feel for the warmest one? :-)

buzz
April 10, 2026

How large is your library? Where is it stored? Are your players wired or wireless?

Probably there is some network congestion. Each track must be fetched from storage by the player running the index and processed by the player. Eventually a copy of the index will be sent to each player. A first build of a new index takes longer, adding or updating a few tracks is much faster.

kdowling
April 11, 2026

S2 takes 10x as long to scan my library as S1. Same library. I’m not sure why that is the case.

buzz
April 11, 2026

I’ve not attempted to put a number on it, but I’ve noticed that the S2 indexer is slow.

Airgetlam
April 11, 2026

One has to wonder if both are using SMB to access the data. I could see there being different access methods…and different code methods. 

Bruce
controlav
Lead Maestro
April 11, 2026

One has to wonder if both are using SMB to access the data. I could see there being different access methods…and different code methods. 

All use SMB, but S1 uses the v1 and S2 uses v2. It’s been a very long time since I worked on the SMB stack (on the Xbox 360!) so I can’t recall if there is much of a performance difference at the file system level.

Author of the leading independent Sonos apps for Android, MacOS, iOS, Windows and Xbox.
Stanley_4
Grand Maestro
April 11, 2026

Might be as simple as the original Sonos coder carefully crafted the sort to use the available hardware and maximize performance. Then the S2 coder came along and when they needed a sort just linked in a generic sort library since the new hardware can support that.

Been a long time since I did embedded (what Sonos firmware code is) coding but the transition from the protype that used generic code in a high level language, on a big system, to get the concept and flow right, to the scrap all but the logic, and hand code in assembly, from scratch, to fit the embedded hardware was amazingly fun. Twiddling individual bits, managing  memory at the byte level and counting every CPU cycle, geek heaven. Most of the coding was done on paper, with a pencil, maybe 20 instructions per sheet of paper.