删除Dom对象后,MS Edge的总内存使用量如何保持增长? [英] How can the total memory usage of MS edge keep growing after Dom Object are removed?

查看:87
本文介绍了删除Dom对象后,MS Edge的总内存使用量如何保持增长?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Microsoft Edge浏览器中遇到内存泄漏"问题.

I have a memory "leak" problem in Microsoft Edge browser.

当我运行内存分析会话并拍摄多个快照时,我看到快照之间的内存已释放.但是总的内存消耗仍在增长(参见图片).

When I run a memory profiling session and take several snapshots, I see the memory between snapshot being freed. but the total memory consumption keep growing (see image).

快照之间的内存差异是先添加iframe,然后再将其从DOM中删除.

The memory difference between snapshots are an iframe being add and then removed from the DOM.

这怎么可能?

推荐答案

我也一直在使用Edge内存探查器来尝试通过iFrame测试内存泄漏.我们发现,边缘探查器本身在添加和删除iFrame的情况下会泄漏内存.

I have been using the Edge memory profiler to try to test memory leaks with an iFrame as well. We found that the Edge profiler itself leaks memory in the context of adding and removing iFrames.

在使用Windows OS性能监视器进行测试时,我发现在未启用Edge Profiler的情况下与启用iFrame时添加和删除iFrame的巨大差异.请从OS性能监视器中查看下图. 在没有性能监视器的情况下,我反复添加和删除许多iFrame-此图可能显示了50个iFrame的添加/删除. Edge使用的内存在该进程使用的400MG左右保持不变.然后,我打开开发工具,打开内存分析器,并添加和删除大约10个iFrame.我们看到Edge所用的内存在短时间内从大约400MG猛增到1000MG以上. 因此,我不再信任此探查器进行内存测试.

When tested with the Windows OS performance monitor, I saw a huge difference in adding and removing iFrames without the Edge profiler on versus with it on. See the following graph from the OS performance monitor. Without the performance monitor on, I add and remove many iFrames repeatedly-- this graph shows perhaps the add/remove of 50 iFrames. The memory used by Edge stays constant around 400MG used by the process. Then, I open dev tools, turn on the memory profiler, and add and remove about 10 iFrames. We see the memory used by Edge shoots up from about 400MG to over 1000MG in a short amount of time. As such, I no longer trust this profiler for memory testing.

这篇关于删除Dom对象后,MS Edge的总内存使用量如何保持增长?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆