Javascript Memory Management - allocating memory to local and global variables

I used a different JS profiler, for example, Google Chrome timeline, where we can capture JS Prilfe, Memory, etc., where it reports the JS Heap size, documents, nodes, sheets and time and many other important things about the page, How you can see in the following figure:

Google Chrome Profiler

I used Internet Explorer Profiler, where new and very effective, it shows the use of memeory and My ID functions and identifiers, as we can see in the following image:

Internet explorer

I installed the plugin (using Tab memory) in firefox, which talks about the memory used by Tab in the browser. This helps to reduce page size by improving the code with the best claims. This was the previous page size (342 MB), now it is between 15 - 20 MB. Look at the image:

Firefix plugin

Then I examine some of the codes in stackoverflow, which was a list view of all the JavaScript variables in the Google Chrome console . I made several other searches to get all the variables inside the webpage, but I have not finished yet.

Problem : I want to get an entire variable which, like memory allocation in this browser tab, will improve spedd and reduce memory usage.

I have greatly improved my webpage by shortening loops, unrelated variables, and resulting variables. I implemented the Save Command and Builder template in javascript for best practices. I am using AngularJS and UnderscoreJs. Because I have to do a lot of calculations and filter arrays using UnderscoreJS.

How can I list all the variables that allocated memory in a browser tab?

+5
source share

Source: https://habr.com/ru/post/1239921/


All Articles