Sixth International Conference on Computer Information Science and Application Technology (CISAT 2023)(2023)
被引用0|浏览3
摘要
With the development of web technology, web pages become more and more complex. Using the virtual DOM method can make the web page have efficient update performance without reducing development efficiency. An essential part of this method is the ability to quickly calculate the differences between the old and new virtual DOMs and update them into the old DOM. This paper presents a multi-threaded virtual DOM difference method based on web workers. This method improves the performance of difference method by offloading tasks to worker threads and using a multi-threaded parallel method based on worker thread pools, and presents a method based on SharedArrayBuffer to reduce the consumption of data communication between threads. Experimental results show that compared with the original main thread difference method, the new method can obtain a speedup ratio of 1.3x-2.4x in the scenario of 10k scale nodes and four threads.