2
2
* Copyright (C) Microsoft Corporation. All rights reserved.
3
3
*--------------------------------------------------------*/
4
4
import * as Flame from '@vscode/codicons/src/icons/flame.svg' ;
5
- import * as LeftHeavyIcon from '@vscode/codicons/src/icons/graph-left.svg' ;
6
5
import { Fragment , FunctionComponent , h , render } from 'preact' ;
7
6
import { useCallback , useContext , useMemo } from 'preact/hooks' ;
8
7
import { ToggleButton } from 'vscode-js-profile-core/out/esm/client/toggle-button' ;
9
- import { usePersistedState } from 'vscode-js-profile-core/out/esm/client/usePersistedState' ;
10
8
import { VsCodeApi } from 'vscode-js-profile-core/out/esm/client/vscodeApi' ;
11
9
import { IReopenWithEditor } from 'vscode-js-profile-core/out/esm/common/types' ;
12
10
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';
15
13
import styles from '../common/client.css' ;
16
14
import { IColumn } from '../common/types' ;
17
15
import { FlameGraph } from './flame-graph' ;
18
- import { buildColumns , buildLeftHeavyColumns , TreeNodeAccessor } from './stacks' ;
16
+ import { buildColumns , TreeNodeAccessor } from './stacks' ;
19
17
20
18
declare const MODEL : IProfileModel ;
21
19
@@ -28,15 +26,6 @@ function getTimelineCols() {
28
26
return timelineCols ;
29
27
}
30
28
31
- let leftHeavyCols : IColumn [ ] ;
32
- function getLeftHeavyCols ( ) {
33
- if ( ! leftHeavyCols ) {
34
- leftHeavyCols = buildLeftHeavyColumns ( MODEL ) ;
35
- }
36
-
37
- return leftHeavyCols ;
38
- }
39
-
40
29
const CloseButton : FunctionComponent = ( ) => {
41
30
const vscode = useContext ( VsCodeApi ) ;
42
31
const closeFlameGraph = useCallback (
@@ -57,25 +46,16 @@ const CloseButton: FunctionComponent = () => {
57
46
const HeapProfileLayout = heapProfileLayoutFactory < TreeNodeAccessor > ( ) ;
58
47
59
48
const Root : FunctionComponent = ( ) => {
60
- const [ leftHeavy , setLeftHeavy ] = usePersistedState ( 'leftHeavy' , false ) ;
61
-
62
49
const FilterFooter : FunctionComponent = useCallback (
63
50
( ) => (
64
51
< Fragment >
65
- < ToggleButton
66
- icon = { LeftHeavyIcon }
67
- label = "Toggle left-heavy view"
68
- checked = { leftHeavy }
69
- onClick = { ( ) => setLeftHeavy ( ! leftHeavy ) }
70
- />
71
52
< CloseButton /> { ' ' }
72
53
</ Fragment >
73
54
) ,
74
- [ leftHeavy ] ,
55
+ [ ] ,
75
56
) ;
76
57
77
- const cols = leftHeavy ? getLeftHeavyCols ( ) : getTimelineCols ( ) ;
78
-
58
+ const cols = getTimelineCols ( ) ;
79
59
const FlameGraphWrapper : FunctionComponent < {
80
60
data : IQueryResults < TreeNodeAccessor > ;
81
61
} > = useCallback (
0 commit comments