Run iOS simulator, mediaanalysisd hogs my CPU

Any idea why this might happen and how to stop it? I try to run a simple iOS app from Xcode, in the iOS Simulator, and it takes a very long time to start. I see "mediaanalysisd" in the Activity Monitor, taking a lot of CPU, fans are blowing. When I quit the simulator, the mediaanalysisd process goes away and the fans stop.

Maybe related: I have a 2020 MacBook Pro with Intel chips, and general it's been having more bogged down performance and fans blowing that in years past. My suspicion is the latest macOS updates are not caring much about Intel CPUs...

Confirming this. Filtering Console for mediaanalysisd shows the workload is a chain of MADTextEmbeddingTask runs scheduled for client com.apple.spotlightknowledged.updater. In my case (an iOS podcast app) the trigger is CSSearchableIndex.indexSearchableItems(...): each batch produces a sustained CPU storm in the Simulator.

I verified the cause by gating the Core Spotlight calls under #if targetEnvironment(simulator). With those calls skipped, mediaanalysisd stays idle and the fans stop.

If you can reproduce, please file Feedback referencing this thread so Apple can prioritize.

Run iOS simulator, mediaanalysisd hogs my CPU
 
 
Q