Home > Article > Software Tutorial > Tencent QQ NT architecture version memory optimization progress announced, chat scenes are controlled within 300M
The memory optimization progress of Tencent QQ NT architecture version was announced. PHP editor Xiaoxin learned that this version controls the chat scene memory within 300M, improving the user experience. This optimization measure will help users reduce memory usage when using QQ and make the software more smooth and efficient.
Recently, the QQ technical team published an introductory article on the InfoQ platform, sharing its phased progress in special optimization of memory.
According to reports, the memory challenges of the new version of QQ are mainly reflected in the following four aspects:
Product form: It consists of a complex large panel (100 modules of varying complexity) and a series of independent functional windows. There is a one-to-one correspondence between windows and rendering processes, and the number of window processes greatly affects Electron's memory footprint. For that complex large panel, it is easy to cause the memory to continue to rise without fine control.
Usage habits: The user hangs up for a long time. Compared with web pages that can be used immediately, QQ users may hang up for more than a month after logging in once. During this period, if you do not control your QQ If the memory is used, the result may be that the memory takes up more and more, the user interaction response becomes slower, or even crashes occur.
Version iteration: The 24-year-old QQ has many functions and features. The team has been doing this for the past year: starting from the core features to quickly complete Windows version, there are also some high-priority new features to be implemented. Continuous and rapid version iteration is likely to create new problems and degrade performance.
Application architecture: The new version of QQ relies on an NT core data module (C addon) to provide localized data services for the UI. QQ This module plays a crucial role in making the loading experience so smooth. At the same time, the linkage optimization with NT also needs to connect client C Of course, there will be some communication costs if the development students work together, but it is undeniable that the memory usage can be reduced and the client students also put in a lot of effort.
In this regard, the work of the QQ technical team mainly includes the following aspects:
Tool analysis: First, the team needs to use memory analysis tools of different dimensions, starting from V8 From the engine to the process and then to the entire application, the entire link is opened for detailed analysis from multiple angles to locate the bottleneck of memory usage.
Targeted optimization: After locating the problem through tools, the team will adopt a series of targeted optimization strategies, including caching strategies, on-demand loading, graceful degradation, etc.
Online monitoring: After passing the local or small-scale verification, the team needs verification from a large number of users to confirm whether the optimization measures are suitable for all scenarios. However, how to get the user in Windows The memory usage seen in Task Manager is a challenge that the team has done a lot of research and verification on.
Prevent performance degradation and automated testing: In order to protect the hard-earned optimization results and avoid frequent version iterations affecting QQ According to the memory target, the team will use development framework, tool construction, code review and other means to prevent performance degradation.
The QQ technical team stated that from the perspective of results or problem solving, after a series of optimizations, the memory of QQ’s core chat scene can basically be controlled within 300M and 150M. The size of the installation package is slightly different from the old version of pure Native QQ. Not only the memory usage, but also other core experiences, such as the smoothness of switching AIO are better than the old version of QQ.
For more information, please pay attention to this site.
The above is the detailed content of Tencent QQ NT architecture version memory optimization progress announced, chat scenes are controlled within 300M. For more information, please follow other related articles on the PHP Chinese website!