matsuyoshi30 / harbor

Simple and minimal personal blog theme.
MIT License
186 stars 68 forks source link

Pages loading slow. #50

Closed Lunarequest closed 3 years ago

Lunarequest commented 4 years ago

I use your theme in my blog. Recently I moved to self hosting my blog. One thing a lot of people were saying is that the page was loading very slowly. After doing some research its because data is read in from json on the client side. Is there a simple way to fix this like using a program to assemble the page client side or do changes need to be made to the theme? currently I am sending all the files via nginx.

if you want to see what I mean go to https://nullrequest.com it takes 5~6 seconds to load.

matsuyoshi30 commented 4 years ago

@advaithm Thank you for letting me know about this issue. I'm trying to improve page loading but I fixed the font loading.

Lunarequest commented 4 years ago

@matsuyoshi30 one thing that is really slowing down the loading is that rendering of the page is done client side with data being written in from the JSON. This greatly increase the loading time. optimizing the rendering client side or having the data merged into the HTML.

Lunarequest commented 4 years ago

@matsuyoshi30 I managed to increase the speed of the page loading by using gzip compression in my nginx config. It loads pretty fast on a desktop platform but on mobile devices its still very slow. as shown here the main issue appears to be js and css that are not used on mobile devices. maybe it could be possible if 2 pages are generated one for mobile users and one for desktop users?

Lunarequest commented 4 years ago

@matsuyoshi30 would if be possible to preload fonts instead of loading them in css. this shows what I mean in practice

Lunarequest commented 3 years ago

Desktop performance is pretty good but on mobile for some reason this theme just can't do well

Lunarequest commented 3 years ago

This can be closed now, the latest version has the same performance on mobile and desktop, which is routinely above 90 on page insights