Skip to content

Commit 53322f7

Browse files
committed
fix: remove non-functional left heavy view from heap flamechart
1 parent 1082be7 commit 53322f7

File tree

3 files changed

+9
-23
lines changed

3 files changed

+9
-23
lines changed

packages/vscode-js-profile-flame/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
trigger:
2+
branches:
3+
include:
4+
- main
25
tags:
36
include: ['*']
47
pr: none

packages/vscode-js-profile-flame/src/client/heap/client.tsx

+3-23
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
* Copyright (C) Microsoft Corporation. All rights reserved.
33
*--------------------------------------------------------*/
44
import * as Flame from '@vscode/codicons/src/icons/flame.svg';
5-
import * as LeftHeavyIcon from '@vscode/codicons/src/icons/graph-left.svg';
65
import { Fragment, FunctionComponent, h, render } from 'preact';
76
import { useCallback, useContext, useMemo } from 'preact/hooks';
87
import { ToggleButton } from 'vscode-js-profile-core/out/esm/client/toggle-button';
9-
import { usePersistedState } from 'vscode-js-profile-core/out/esm/client/usePersistedState';
108
import { VsCodeApi } from 'vscode-js-profile-core/out/esm/client/vscodeApi';
119
import { IReopenWithEditor } from 'vscode-js-profile-core/out/esm/common/types';
1210
import { heapProfileLayoutFactory } from 'vscode-js-profile-core/out/esm/heap/layout';
@@ -15,7 +13,7 @@ import { IQueryResults, PropertyType } from 'vscode-js-profile-core/out/esm/ql';
1513
import styles from '../common/client.css';
1614
import { IColumn } from '../common/types';
1715
import { FlameGraph } from './flame-graph';
18-
import { buildColumns, buildLeftHeavyColumns, TreeNodeAccessor } from './stacks';
16+
import { buildColumns, TreeNodeAccessor } from './stacks';
1917

2018
declare const MODEL: IProfileModel;
2119

@@ -28,15 +26,6 @@ function getTimelineCols() {
2826
return timelineCols;
2927
}
3028

31-
let leftHeavyCols: IColumn[];
32-
function getLeftHeavyCols() {
33-
if (!leftHeavyCols) {
34-
leftHeavyCols = buildLeftHeavyColumns(MODEL);
35-
}
36-
37-
return leftHeavyCols;
38-
}
39-
4029
const CloseButton: FunctionComponent = () => {
4130
const vscode = useContext(VsCodeApi);
4231
const closeFlameGraph = useCallback(
@@ -57,25 +46,16 @@ const CloseButton: FunctionComponent = () => {
5746
const HeapProfileLayout = heapProfileLayoutFactory<TreeNodeAccessor>();
5847

5948
const Root: FunctionComponent = () => {
60-
const [leftHeavy, setLeftHeavy] = usePersistedState('leftHeavy', false);
61-
6249
const FilterFooter: FunctionComponent = useCallback(
6350
() => (
6451
<Fragment>
65-
<ToggleButton
66-
icon={LeftHeavyIcon}
67-
label="Toggle left-heavy view"
68-
checked={leftHeavy}
69-
onClick={() => setLeftHeavy(!leftHeavy)}
70-
/>
7152
<CloseButton />{' '}
7253
</Fragment>
7354
),
74-
[leftHeavy],
55+
[],
7556
);
7657

77-
const cols = leftHeavy ? getLeftHeavyCols() : getTimelineCols();
78-
58+
const cols = getTimelineCols();
7959
const FlameGraphWrapper: FunctionComponent<{
8060
data: IQueryResults<TreeNodeAccessor>;
8161
}> = useCallback(

packages/vscode-js-profile-table/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
trigger:
2+
branches:
3+
include:
4+
- main
25
tags:
36
include: ['*']
47
pr: none

0 commit comments

Comments
 (0)