Why use Performance?

The purpose of GC is to make the memory space in the program run in a virtuous cycle, the basis of the so-called virtuous cycle is that we can write code in memory allocation. Since ES does not provide an API for manipulating memory space, there is no standard for determining whether it is reasonable or not, because it is all done by GC. So in this case, we have to find a way to pay attention to a change in the current memory in order to determine whether the memory usage is reasonable. So now we have a tool that gives us a lot more monitoring. In the running process of the program to help us to complete the memory space monitoring operation, this piece of simple summary is to use Performance to monitor the memory changes in the running process of the current program at another moment. With such an operation, when our program memory exception directly to find a way to locate the current problem block of code.

Performance Procedure

  • Open your browser and enter the destination url
  • Go to the Developer tools panel and select Performance
  • Enable the recording function and access the specific page
  • Perform user action and stop recording after a certain period of time
  • Analyze memory record information on the interface