Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site is too slow #14

Open
timofeysie opened this issue Mar 23, 2024 · 2 comments
Open

Site is too slow #14

timofeysie opened this issue Mar 23, 2024 · 2 comments

Comments

@timofeysie
Copy link
Owner

timofeysie commented Mar 23, 2024

Load times when the user is visiting the site for the first time that day are over 20 to 30 seconds.

The site is hosted on Heroku. This consists of a front end app, and a backend server based app. The server app also stores data on a freely hosted ElephantSQL.com database.

We can increase the speed by using a paid tier at Heroku. The backend also uses Django serializers which are known to have bad performance, so this is something else that can also be addressed.

My Tundra 64 app app is also hosted on Heroku, and it has decent load times. So this is what we are aiming for.

Tundra 64 was an app to create automated posts based on trending google searches. The posts were then meant to show up in google search results and generate a small amount of ad clickthrough revenue.

However, the site performed poorly dues to it's Angular architecture. It was apparent that it would never be able to achieve good SEO (Search Engine Optimization) so I created another project called Ruffmello which solves these issues by using the AMP framework along with a static site generation technique using React (Preact actually, a lightweight version of React) via the Vercel framework. Ruffmello.com loads blindingly fast and would perform well if SEO is done properly.

This second approach is the best fit at least for the list of posts and polls.

@timofeysie
Copy link
Owner Author

Heroku has a slightly more expensive tier called "Basic Dyno" which I have applied to both the frontend and the backend:
Screenshot 2024-03-23 095456
We can evaluate the performance there, as well as look at paying more for the elephand database.

@timofeysie
Copy link
Owner Author

With the current Heroku upgrade, the site itself loads in about 4-5 seconds, but then the API calls and the associated database queries add another 3-4 seconds (shown as the loading spinners).
There are two issues with this time:

  1. Django serializers are slow
  2. Elephant DB free tier.

Regarding point 2, the Elephant DB has the following comical names:

  • Tiny Turtle (Free)
  • Simple Spider ($5/month)
  • Crazy Cat ($10/month)
  • Pretty Panda ($19/month)
  • Blissful Butterfly ($49/month)
  • Happy Hippo ($99/month)
  • Enormous Elephant ($199/month)
  • Puffy Pigeon ($399/month)
  • Dramatic Dolphin ($749/month)
  • Ruthless Rat ($1399/month)
  • Blissful Butterfly with follower ($98/month)
  • Happy Hippo with follower ($198/month)
  • Enormous Elephant with follower ($398/month)
  • Puffy Pigeon with follower ($798/month)
  • Dramatic Dolphin with follower ($1498/month)
  • Ruthless Rat with follower ($2798/month)

Currently we are on the "Tiny Turtle" option. I don't know what performance increases the other options would provide.

Also, I actually don't think it's worth considering any of these for a few reasons. One is that there is a message on their site that reads "ElephantSQL will discontinue its services. The product will reach its End of Life on January 27, 2025".

So this is what is known as "technical debt". There are a number of other items that belong on this list (such as the legacy React version) so I will open another issue to discuss solutions to them there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant