Very slow server response time

Highlighted
Tourist
10 2 2

So, I have this website

 

The menu is causing a 5 second server response time. In my point of view this shouldn't be the case but hey.... i'm not making the rules. A 1 gb Wordpress website does this instantly it's not an option here.

 

Details: I have 2 menus, categories and car brands.

 

For each category+car_brand I check if that collection exists and display it. I also check to see that car brand exists in the sections settings so I can pull the logo for it.

 

Any ideas on how to fix this? Shopify offers 0 support on it. 

 

The code:

			{% assign car_brands = linklists[settings.auto_brands] %}
			{% for link in linklists.main-menu.links %}
				<li class="hasSM">
					<a href="{{ link.url }}">{{ link.title }} <i class="i i-arr_d_bold"></i></a>
					<div class="tSMenu" style="height:0;">
						<div class="SMenuIWC">
							<div class="SMenuIW">
								<h3>{{ link.title }}</h3>
								<ul class="">
									{% for brand in car_brands.links %}
										{% assign auto_submenu = link.handle | append: "-" | append: brand.handle %}
										{% assign brand_cat = collections[auto_submenu] %}
										{% assign brand_size = brand_cat.products | size %}
										{% comment %}
											CHECK IF COLLECTION EXISTS
										{% endcomment %}
										{% if brand_cat != blank and brand_size > 0 %}
											{% for block in section.blocks %}
												{% if block.type == 'auto_brand' %}
													{% if block.settings.title == brand.title %}
														{% assign blogo = block.settings.logo | img_url: 'master' %}
													{% endif %}
												{% endif %}
											{% endfor %}
											<li>
												<a href="/collections/{{ brand_cat.handle}}">
													<img src="data&colon;image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAADIAQMAAADx6ZejAAAAA1BMVEXu7u6DSdFtAAAAHUlEQVRYw+3BAQEAAACCoP6vbojAAAAAAAAAgIwDHCAAAQYR5vwAAAAASUVORK5CYII=" data-src="{{ blogo }}" class="lazy" alt="{{ brand_cat.title }}" />
													{{ brand.title }}
												</a>
											</li>
										{% endif %}
									{% endfor %}
									<li class="smOverlay"></li>
								</ul>
							</div>
						</div>
					</div>
				</li>
			{% endfor %}
0 Likes