# How to increase site speed

**URL:** https://meta.discourse.org/t/how-to-increase-site-speed/60791
**Category:** Self-hosting
**Created:** [4월 11, 2017, 4:42오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791 "2017-04-11T16:42:21Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Alavi1412](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alavi1412/32/67721_2.png) [@Alavi1412](https://meta.discourse.org/u/Alavi1412)
#### Post date: [4월 11, 2017, 4:42오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/1 "2017-04-11T16:42:21Z")

</div>

[Our site](https://padpors.com)’s speed is very low, we have disabled widgets and extra JavaScript codes but still site has a very low speed, we have scanned our site but the scanner told has to fix some emberjs codes and we don’t want to modify the discourse source code.  
How can we speed up our site?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [4월 11, 2017, 5:10오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/2 "2017-04-11T17:10:28Z")

</div>

### Time to First Byte

At 450ms for a anon user, this is not that great. Easiest way to make it better is using a better server with faster CPU.

I get half of that here on Meta.

### Site Size

2.4MB for a website is crazy. Reduce that ASAP.

Meta sits at 816KB currently, and that’s somewhat heavy, but we have made it better last year, and will make it better this year too.

### Requests

Your site have double (120) the request count of Meta. We know HTTP2 makes it better to have many requests, and saved us from the inline-everything dark ages, but this isn’t an excuse to use 100+ requests to draw a webpage.

### Plugin stravaganza

[Last time I checked](https://meta.discourse.org/t/empty-page-when-both-category-and-tag-are-filtered/60585/3) you have more than 10 third-party plugins. Well, as some guy said [The best code is no code at all](https://blog.codinghorror.com/the-best-code-is-no-code-at-all/).

If you really want all those cool plugins, well you have to pay the speed price.

---

<div class="post-metadata">

### Author: ![Alavi1412](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alavi1412/32/67721_2.png) [@Alavi1412](https://meta.discourse.org/u/Alavi1412)
#### Post date: [4월 11, 2017, 6:03오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/3 "2017-04-11T18:03:45Z")

</div>

> [@Falco](#):
>
> Reduce that ASAP.

How should we do This?

What is the best way to increase that?

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 11, 2017, 6:09오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/4 "2017-04-11T18:09:37Z")

</div>

Where have you hosted your site?

Can you please tell us your specification of the hosting account?

---

<div class="post-metadata">

### Author: ![Alavi1412](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alavi1412/32/67721_2.png) [@Alavi1412](https://meta.discourse.org/u/Alavi1412)
#### Post date: [4월 11, 2017, 6:46오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/5 "2017-04-11T18:46:05Z")

</div>

Amazon web Service / Micro.

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 11, 2017, 6:52오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/6 "2017-04-11T18:52:22Z")

</div>

Then the poor loading time is not releated with hosting issues. Anyway, you should try to increase the RAM, as you have significant amount of users in your forum.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [4월 11, 2017, 7:21오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/7 "2017-04-11T19:21:46Z")

</div>

Maybe not the only cause, but [PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fpadpors.com%2F&tab=desktop)  
has two “should fix”

If you have custom script in `<head>` maybe try it in `</body>` instead?

Maybe this is using full weight images resized with CSS?

> [@Display boxes for subcategories above topic list](https://meta.discourse.org/t/displaying-sub-categories-in-boxes/59371):
>
> bookmark This guide explains how to display boxes for subcategories above the topic list in Discourse. person_raising_hand Required user level: Administrator (or moderator if the moderators manage categories setting is enabled) There are four ways to display a list of sub-categories within the parent category: in rows (the default style) in rows with a list of some featured topics in boxes with only the name, logo, and description in boxes with name, logo, and a list of some featured t…

Or is it this plugin?  
[https://meta.discourse.org/t/topic-list-previews/41630](https://meta.discourse.org/t/topic-list-previews/41630)

---

<div class="post-metadata">

### Author: ![nicatronTg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nicatrontg/32/103643_2.png) [@nicatronTg](https://meta.discourse.org/u/nicatronTg)
#### Post date: [4월 12, 2017, 3:21오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/8 "2017-04-12T15:21:31Z")

</div>

> [@Alavi1412](#):
>
> Amazon web Service / Micro.

I’m sorry if I’m reading this wrong. Are you saying that you’re on the AWS t2.micro instance size? The instance size with 1GB of RAM and 1 vCPU? You’re probably hitting CPU constraints, if not RAM constraints due to your plugin load.

From the AWS docs:

> T2 instances are Burstable Performance Instances that provide a baseline level of CPU performance with the ability to burst above the baseline. The baseline performance and ability to burst are governed by CPU Credits. Each T2 instance receives CPU Credits continuously at a set rate depending on the instance size.

With a Micro instance, you’re getting 6 CPU credits/hour, and that’s not _great_. You’d probably be better off migrating to the Digital Ocean equivalent tier, which is $10/mo, or even the DO $20/mo tier that offers double the RAM.

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 12, 2017, 4:04오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/9 "2017-04-12T16:04:41Z")

</div>

Thanks for explaning. I have already mentioned it to him, but I was busy At that moment.

@Alavi1412 should consider this and make neccessary changes

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [4월 13, 2017, 1:27오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/10 "2017-04-13T13:27:31Z")

</div>

Sorry sir for the not-updated information, it’s on a t2 small instance, which is 2G ram and 12cpu/hour.

I don’t thing we need more cpu/ram with the amount of traffic we have, currently. is there any way to measure this?

---

<div class="post-metadata">

### Author: ![nicatronTg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nicatrontg/32/103643_2.png) [@nicatronTg](https://meta.discourse.org/u/nicatronTg)
#### Post date: [4월 13, 2017, 2:04오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/11 "2017-04-13T14:04:00Z")

</div>

> [@Pad\_Pors](#):
>
> I don’t thing we need more cpu/ram with the amount of traffic we have, currently. is there any way to measure this?

You could try [safe mode](https://meta.discourse.org/t/how-to-use-discourse-safe-mode/53504) and see if the network conditions improve at all. That would tell you that your plugins are a big cause. Rafael’s points are still very valid. You need to have a beefy box if you’re going to run tons of plugins to compensate for the increased load.

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [4월 17, 2017, 3:32오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/12 "2017-04-17T15:32:44Z")

</div>

regarding your hint about caching:

> [@Mittineague](#):
>
> I would be more inclined to have concern over “browser cache” warnings

the warning is about 3 google analytics resources, and two fonts.

1. we have set the analytics via the admin setting panel, how can we add expiry date to these resources?
2. how can we add expiry date to other resources? as the answers found via google address the htaccess file, which doesn’t exist in the discourse folder. do you have any idea how I should that?

> [@Falco](#):
>
> 2.4MB for a website is crazy. Reduce that ASAP.

Thanks for the advice, but I can’t understand what is this size for?! as even when the plugins are deactivated, our site size is only slightly different from this number! how can one find out what is the size for?

Thanks in advance

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [4월 17, 2017, 3:46오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/13 "2017-04-17T15:46:06Z")

</div>

> [@Pad\_Pors](#):
>
> how can one find out what is the size for?

Well, Chrome DevTools (F12) gives you the size of every asset.

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 17, 2017, 4:40오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/14 "2017-04-17T16:40:46Z")

</div>

Dear Padpors,

I have just tried to debunk the the information. One of the reasons behind the large homepage loading size may be due to the huge numbers of photos in the homepage.

 ![](https://global.discourse-cdn.com/meta/original/3X/6/a/6aae110760f29dfc5cca4208d6199059653e1367.png)

Whooping high number of images, which are scaled and non scaled in your website. That’s the reason of large size

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 17, 2017, 4:45오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/15 "2017-04-17T16:45:20Z")

</div>

I would like to say, somehow try implementing Lazy loading and load only a few images and few topics, Now your site loads 11\*3 = 33 topics in one go. Reduce it to load about 6 topic with images in the homepage. Which will reduce the initial loading images. Doing so will reduce about 1 MB of page size. Hope you will figure it out

---

<div class="post-metadata">

### Author: ![kemporu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kemporu/32/69274_2.png) [@kemporu](https://meta.discourse.org/u/kemporu)
#### Post date: [4월 17, 2017, 4:59오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/16 "2017-04-17T16:59:58Z")

</div>

Photos can be removed. I am concerned

![](https://global.discourse-cdn.com/meta/original/3X/0/0/0053a7a335eae585dc95a3dc7ad5a78fc970e681.jpg)

**1.** number of loaded js files  
**2.** their total volume. 3MB! that’s a lot.

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 17, 2017, 5:04오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/17 "2017-04-17T17:04:07Z")

</div>

Yeah! @kemporu, I didn’t notice that. That is too much for js files. It is enough to make old system and old browsers go unresponsive

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 17, 2017, 5:05오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/18 "2017-04-17T17:05:37Z")

</div>

But, look at the time taken to load the images, it is way more than those js files.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [4월 17, 2017, 5:45오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/19 "2017-04-17T17:45:26Z")

</div>

Way more?! If my math is right, that’s like 23 _minutes_ 😱  
If that is with the Topic List Previews plugin disabled, that leaves the avatars?

Is the site using a CDN?

---

<div class="post-metadata">

### Author: ![EducatorWaji](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/educatorwaji/32/66699_2.png) [@EducatorWaji](https://meta.discourse.org/u/EducatorWaji)
#### Post date: [4월 17, 2017, 6:30오후 UTC](https://meta.discourse.org/t/how-to-increase-site-speed/60791/20 "2017-04-17T18:30:13Z")

</div>

I guess not! If they had used CDN’s the loading time might have been much better.

[다음 페이지](https://meta.discourse.org/t/how-to-increase-site-speed/60791.md?page=2)
