| With the rise of mobile platforms,the traditional front-end and back-end coupling development model is no longer appropriate,and the back-end has been changed to be exclusively responsible for providing data interfaces to cope with the needs of multiplatform development.Therefore,the front-end and back-end became independent and the web application started to be engineered.In the transformation of front-end engineering,developers not only need to explore the engineering paradigm suitable for front-end development,but also need to deal with the performance problems that arise in the process of practice and solve them in time.In the process of project engineering practice,solutions to many performance problems encountered in the development process are given and implemented by combining framework principles and emerging technologies.For the problem of delayed earliest interactivity of the page due to the development paradigm of single-page application,we optimized the file pulling process and the parsing and rendering process respectively,using the Cache API-based preloading technology to reduce the time delay of the pulling process,and using the progressive rendering method to render the page in a gradient manner to improve the overall rendering speed of the page.For large tables with slow rendering updates and inefficient operations,in the vnode rendering(render)phase,check whether the state of the vnode has changed and reuse the cached vnode if it has not changed,avoiding a lot of high-overhead vnode new operations;in the update commit(commit)phase,the framework needs to use the Diff algorithm Compare the difference between the old and new vnode to determine the DOM operations that need to be performed,the project uses the LIS algorithm to optimize the framework’s original Diff algorithm,reducing unnecessary DOM operations and avoiding the lag caused by large table updates.Finally,the implementation of the system and all the optimizations were tested to ensure the perfection and stability of the project functionality and the effectiveness of the optimization work to meet the functional and non-functional needs of the users. |