The mall system developed with the fastapp framework does not use a template engine on the front end, but uses some widgets. As a result, when the data obtained from the database is too large, the page loads too slowly. Can you please tell me how to optimize it? ?
The mall address is this, http://www.lber.com.cn
The page that loads slowly is my order page.
The mall system developed with the fastapp framework does not use a template engine on the front end, but uses some widgets. As a result, when the data obtained from the database is too large, the page loads too slowly. Can you please tell me how to optimize it? ?
The mall address is this, http://www.lber.com.cn
The page that loads slowly is my order page.
Loading too much data at one time will inevitably be slow. Moreover, if a template engine is not used, the rendered template will not be cached. It will be rendered once every time it is requested, which will definitely be slow.
It is recommended to use a template engine and enable engine caching.
Don’t get too much data from the database at once, use several asynchronous pulls to pull data from the background. Reduce the pressure of first loading. Data that does not change frequently should also be cached.