mirror of
				https://github.com/mozilla/gecko-dev.git
				synced 2025-11-04 10:18:41 +02:00 
			
		
		
		
	
		
			
				
	
	
	
	
		
			1 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1 KiB
		
	
	
	
	
	
	
	
Debugging slow builds
Some tips for debugging slow build times:
- Use ninjatracing and chrome:tracing to
view a timeline of the most recent build.
- Many bots output a build trace (look for a 
"ninja_log"link). 
 - Many bots output a build trace (look for a 
 - Use 
gn gen --tracelog trace.jsonto create a similar trace forgn gen. - Depot Tool's 
autoninjahas logic for summarizing slow steps. Enable it via:NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Debug my_target
 - Many Android templates make use of
md5_check.pyto optimize incremental builds.- Set 
PRINT_BUILD_EXPLANATIONS=1to have these commands log which inputs changed. 
 - Set 
 - If you suspect files are being rebuilt unnecessarily during incremental
builds:
- Use 
ninja -n -d explainto figure out why ninja thinks a target is dirty. - Ensure actions are taking advantage of ninja's 
restat=1feature by not updating timestamps on outputs when their content does not change. 
 - Use