Test ajax locally to receive paging data. The response should be around 1 S (above) but is there any good solution between 900 ms and ms on the server to solve the slow ajax acquisition speed? The paging data has been changed to json. The data size is not much improved. The display time is kb and the processing time is 1.03s. logic... test ajax locally to receive paging data. The response should be around 1 S (above) but is there any good solution between 900 ms and ms on the server to solve the slow ajax acquisition speed? The paging data has been converted into json, which is not much improved.
The data size is displayed in 2.9kb and 1.03 s. The processing logic is that 10 mysql information fields are simply queried.
I tested whether to return a small data of 392b or about 1 S. Is it because my local database query is slow?
Jquery and ajax are used.
Reply content:
Test ajax locally to receive paging data. The response should be around 1 S (above) but is there any good solution between 900 ms and ms on the server to solve the slow ajax acquisition speed? The paging data has been converted into json, which is not much improved.
The data size is displayed in 2.9kb and 1.03 s. The processing logic is that 10 mysql information fields are simply queried.
I tested whether to return a small data of 392b or about 1 S. Is it because my local database query is slow?
Jquery and ajax are used.
This problem is probably because your local supportIPv6
And your localMysql
Support reverse resolution.
There are three solutions to the problem:
Modify local database connectionlocalhost
Change127.0.0.1
This is the simplest way.
Disable IPv6 in Registry
MySql disables reverse resolution.
Here is a blog can refer to: http://blog.onephp.net/archives/32/
You need to first check where the slowness is. From the data perspective, it seems that the background processing logic is time-consuming. This depends on how the implementation logic is optimized. In addition, we recommend that you use chrome's developer tool to check the response time of each section of the request and then diagnose whether it is related to the network.
@ Lovnie is skillful in asking questions. A simple method is to answer questions by yourself.
Q: Why is the local speed of ajax requests slow and the server speed?
A: The local network is unlikely to be a problem, that is, the background interface is slow! (Check the interface response time for debug debugging)
Q: Where is the interface slow? (Assuming the previous analysis is correct)
A: What is the time-consuming code for analysis with logs?
This problem becomes the reason why the XXX code runs so slowly. You can search for it and analyze it by yourself. The problem cannot be solved, so the problem becomes more advanced.