angular.js - Is angularJS suitable for such a technical solution? 20 ajax requests on one page
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-15 17:02:23
0
1
530

Is angular a scenario solution suitable for the following situations?
The page needs to count the total number of registrations, total posts, total logins, and total number of Baidu spider crawls by time (such as days, months, weeks) in the corresponding tables of the entire database, involving a total of more than ten original data tables (information tables, Article table, user table, PV table...), the method used now is to calculate all statistics in PHP, and then assign the data to the page for display. But because the actual data involved in the data table is too huge. As a result, the statistics page that used to be very fast to check in is now 502 / 504 as soon as I open it. So I thought of loading the page first, then using ajax to obtain the statistics of individual tables one by one, and then display them.

Idea: I plan to send an ajax request to the page one by one, so that it can be loaded asynchronously. Is there a better solution to avoid causing website 504?

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(1)
左手右手慢动作

Asynchronous is on the one hand, optimizing page loading time. But on the other hand, you also need to optimize backend queries, and many computationally intensive operations can be cached

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template