Optimization of blog home page loading
From just doing a good job on this blog is not the first time to find out, when launching ajax requests, you can see that the content-download time is actually longer than the waiting time, and the home page waiting time can reach several seconds, truly slow, put a picture to prove that.
You can see that almost all the time of ajax requests is wasted in content-download, generally speaking, the loading time should be on waiting, not download, I never know how to optimize
Last week, I checked the data of ajax requests, and the data of each blog loaded on the home page actually carries the markdown field and html field of the upper blog post, the sheer volume of data of these two fields is not ordinary. So I know why content-download keeps taking so much time to start rendering the page
This is a major bug!!!
Immediately went back and changed it over, the ajax requested on the home page is paged blog data and should not return the blog post field. Changed the backend to query paginated data to remove these two fields and it looks, well ~ much faster
From here it is linked to the return of individual ajax data, if a field is very large and does not need to be used in the current page, it is best not to return it, lest the page takes too long to load and the experience is not good
The other pages of this blog are optimized for each ajax request, so it's clear what to pass and what not to pass~
Previously blogged about this:- Page Performance Optimization
Blog address.https://ainyi.com/#/62