mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-30 09:54:02 +08:00
Heap snapshots often have a very large number of objects with the constructor "Object", since those represent plain JS objects created with object-literal notation. Due to the sheer size of that category, it can be difficult to find patterns of memory usage where large numbers of small matching objects cause substantial memory usage. With this CL, plain JS objects will be separated out by "interface", where an interface is a list of property names, and any object containing those property names matches the interface. Bug: 356183770 Change-Id: I519f2d6593f7aacee162712d8d5b4777734d8373 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5817911 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
16 lines
577 B
HTML
16 lines
577 B
HTML
<!--
|
|
Copyright 2024 The Chromium Authors. All rights reserved.
|
|
Use of this source code is governed by a BSD-style license that can be
|
|
found in the LICENSE file.
|
|
-->
|
|
<h1>Memory Panel (Heap profiler) Test</h1>
|
|
<button id="update">Click here after first snapshot</button>
|
|
<script>
|
|
var a = {a: 2, b: 3, c: 4, d: 5, e: 6};
|
|
var b = {a: '', b: true, c: false, d: null, p: 5, q: 6, r: 7};
|
|
var c = {a: 1, b: 2, c: 7, d: 8, p: 0, q: 0, r: 0};
|
|
document.getElementById('update').addEventListener('click', function () {
|
|
b = {a: 0, b: 1, c: 2, d: 3, e: 4};
|
|
});
|
|
</script>
|