mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	attachments: Stop fetching attachments in / endpoint.
We only use this data in a rarely-used settings screen, and it can be large after years of posting screenshots. So optimize the performance of / by just loading these data when we actually visit the page. This saves about 300ms of runtime for loading the home view for my user account on chat.zulip.org.
This commit is contained in:
		@@ -125,9 +125,6 @@ def fetch_initial_state_data(user_profile: UserProfile,
 | 
			
		||||
        state['custom_profile_fields'] = [f.as_dict() for f in fields]
 | 
			
		||||
        state['custom_profile_field_types'] = CustomProfileField.FIELD_TYPE_CHOICES
 | 
			
		||||
 | 
			
		||||
    if want('attachments'):
 | 
			
		||||
        state['attachments'] = user_attachments(user_profile)
 | 
			
		||||
 | 
			
		||||
    if want('hotspots'):
 | 
			
		||||
        state['hotspots'] = get_next_hotspots(user_profile)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user