[front-end] ajax request slowly affects page jump and, abort () stops will also stutter

performance optimization problem: slow ajax requests affect the jump between pages.

problem description: click, click on the personal Center or other tabs, the right boundary will stutter will not immediately switch, will switch after a while.
as shown in the figure, a balance query is performed in the quota conversion, and the ajax request takes about 6 seconds and 7 seconds. If the ajax request is removed, the above switch stutter will not exist, and the interface of manually calling the ajax.abort () method will still stutter for a few seconds to jump. Problem lock ajax request can not jump immediately, do you have any good ideas to solve this problem?

Mar.06,2021

check the handle function of the click event. This pot ajax does not carry


ajax does not affect performance in principle. Check if there are a large number of cyclic dom operations after you click, but this will affect performance


first of all, you take a look at the ajax request response time in the console. If you put it back in milliseconds, it means that there is a large amount of computation in some parts of your page, resulting in page switching stuttered. If the ajax request response time is 6-7 seconds, whether to consider whether there are ajax requests set to Synchronize, and then to rule out whether the dom operations are too frequent.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4451a-44230.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4451a-44230.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?