Monitor page memory resources and DOM nodes in IE (sieve software usage ))

Source: Internet
Author: User
Monitor page memory resources and DOM nodes in IE (sieve software usage Introduction)

Download: http://files.cnblogs.com/lsjwzh/sIEve-0.0.8.rar
Note the following:ArticleI just want to explain how to use sieve (an enhanced drip version) in IE to discover Memory leakage and memory reclaim problems,

Instead of explaining the principles of IE memory management and Memory leakage.

For more information about ie memory management and Memory leakage, please google it on your own.

SieveThis is a problem that helps us check the memory usage and Memory leakage of IE browser (which is based on the IE kernel installed by the operating system.

It can:

Java Code
    1. 1List the basic information of all DOM nodes on the current page (such as html id style)
    2. 2Advanced information of all DOM nodes on the page (memory usage, quantity, and node reference)
    3. 3You can find isolated nodes on the page.
    4. 4You can find the cyclic reference in the page.
    5. 5You can find out the nodes that cause memory leakage on the page.
 
1. List basic information of all DOM nodes on the current page (such as html id style) 2. Advanced information of all DOM nodes on the page (memory usage, quantity, and reference of nodes) 3. You can find the isolated nodes on the page. 4. You can find the cyclic references on the page. 5. You can find the nodes that generate memory leaks on the page.

For more detailed help documents, see:

Http://home.orange.nl/jsrosman/sievehelp.htm

The following is a brief introduction.

Please download the demo file and sieve software in the attachment first.

After running, enter the address of the page to be tested in the address column above, for example, file: // D:/mydev/ie_mem/test_ie.html.

Appears:

(Figure)

[Img] Quit

The lower end is the memory-changing graph. Various function buttons are displayed in the upper right corner of the graph.

The bottom right corner is the information in the page (very important). The list is automatically refreshed on a regular basis. The five columns of information are as follows:

Total memory usage (unit: KB)

Compared with the last time the list is automatically refreshed

Number of current DOM nodes

Number of nodes that generate memory leaks

Log information (some information is not frequently used when a node exception occurs)

Next let's take a look at how he uses it.

1. It is difficult to remove nodes in IE.

Click "_ removenode div_1" on the test page.

You can see that the DIV is removed from the page, but the "current Dom node number" in the Information List on the right does not change.

Click Show in use in the upper-right corner.

At this time, you can see in the pop-up window that the node id = div_1 is isolated but not recycled (there are two isolated nodes that you don't need to worry about)

(Figure)

2. It is better to remove nodes in IE.

Close the pop-up window and click "removeelement div_2" on the test page. div_2 is removed and "Current Dom node count" is reduced.

Check show in use. You can see that div_2 and its subnodes have been removed.

The above two experiments demonstrate how to view isolated nodes and demonstrate that the second method to remove nodes is more effective.

3 cycles

Close the pop-up window and click "createcycle div_3" on the test page,

Click scan now in the upper-right corner)

Click Show in use to view the nodes in use.

As you can see, the div_3 node forms a cycle. At the same time, you can see the outerhtml below to roughly analyze the causes of the loop.

(The style node will also be referenced as a loop. I don't know whether it is an IE problem or a software problem. You don't need to care about the style anyway)

(Figure)

4. Memory leakage

Close the pop-up window and click "creatememleak div_4" on the test page.

The page is automatically refreshed. You can see that the number of leaks increases in the list on the right.

Click Show leaks to view the memory leakage Point.

(Figure)

Finally, you can view more node information in the pop-up window (double-click a node)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.