Xcode 16.3 repeatedly log causing CPU leak

Xcode 16.3 repeatedly logs a same message very frequently, as fast as a single thread can. I use Instruments and Console and find out the log is:

Needs flush!

by -[DNTBrotliDecoder decodeBytes:length:] in DNTDocumentationSupport.

The call is on a single non-main thread. I've tried to clear caches and it seems doesn't change. Yet I don't know exact point when the logging starts since launch.

Fortunately, this thread is dispatched at E cores, bringing approximately 2 watts of power load to my Mac.

Environments:

  • macOS 15.4 (24E248)
  • Xcode 16.3 (16E140)
  • M4 chip

Answered by lAppliEnRose in 841120022

Problem solved in Xcode version 16.4 (16F6) available now.

I have the same problem and my documentation indexing always gets stuck at about 15%. I've deleted the entire ~/Library/Developer folder with no change. • macOS 15.4 (24E248) • Xcode 16.3 (16E140) • M4 Pro (14-core) Mac mini

Problem persists and behaves in the same way in a fresh macOS 15.5 beta (24F5042g). I used UTM as a Virtualization environment.


bringing approximately 2 watts of power load to my Mac

I'm new to Apple silicon therefore I wrongly measured the power consumption. It seems to be 0.15W ~ 0.2W on M4 and 6W on virtualized M4.

Same issue here, when searching in documentation help, all is functional but there is a progress bar at the bottom saying "indexing..." stuck on the left. Activity monitor shows Xcode using 85% CPU. Process is XCode, DNTDocumentationSupport. Output from Console:

default 16:41:51.375813+0200 Xcode Needs flush!

About 20,000 logs per second!

Problems gone 16.4 beta (16F1t). Seems working fine on all macOS.

Also seeing Needs flush!, but in Console.app.

Quitted Xcode. Removed the Xcode folders:

  • DerivedData
  • DocumentationCache
  • DocumentationIndex

The problem is still there. FeedBack ID: FB17351766

Accepted Answer

Problem solved in Xcode version 16.4 (16F6) available now.

Xcode 16.3 repeatedly log causing CPU leak
 
 
Q