Commit d1b4db0
[RPP] Don't make excessive copies of trace during export
- In Base64.ts `encode`, we were using `.split`. That creates copies of
the very large string. Instead, use `.slice` to leverage V8's sliced
strings optimization.
- In TimelinePanel.ts `innerSaveToFile`, we retained large copies of the
trace data as Blob/BlobPart throughout the entire lifetime of the
function. Instead, clear the variables when done to free them sooner.
I suspect these issues greatly raised the amount of memory needed to
export a trace, and are direct causes of the referenced OOM bug.
Bug: 450046606
Change-Id: I05a2ad3e30e16bd69a49501b56335b6dfde985d3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7453170
Auto-Submit: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>1 parent 9066161 commit d1b4db0
File tree
2 files changed
+15
-2
lines changed- front_end
- core/common
- panels/timeline
2 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | | - | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
| 1543 | + | |
1543 | 1544 | | |
1544 | 1545 | | |
1545 | 1546 | | |
| |||
1560 | 1561 | | |
1561 | 1562 | | |
1562 | 1563 | | |
| 1564 | + | |
| 1565 | + | |
1563 | 1566 | | |
1564 | 1567 | | |
1565 | 1568 | | |
| |||
1569 | 1572 | | |
1570 | 1573 | | |
1571 | 1574 | | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1572 | 1578 | | |
1573 | 1579 | | |
1574 | 1580 | | |
1575 | 1581 | | |
1576 | | - | |
| 1582 | + | |
1577 | 1583 | | |
1578 | 1584 | | |
1579 | 1585 | | |
| |||
0 commit comments