mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	I'm not sure exactly what series of history got us here, but we were fetching the mobile_user_ids data for all users in the organization, regardless of whether they were recently active (and thus relevant for the main presence data set). And doing so in a sloppy fashion (sending every user ID over the wire, rather than just having the database join on Realm). Fixing this saves a factor of 4-5 on the total runtime of a presence request on organizations with 10Ks of users like chat.zulip.org; more like 25% in an organization with 150. Since large organizations are very heavily weighted in the overall cost of presence, this is a huge win. Fixes part of #13734.
		
			
				
	
	
	
		
			6.8 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			6.8 KiB