Skip to content

Commit b621692

Browse files
Use TimeGraphContainer noWebGl option
There's a relatively low limit of WebGL contexts available for a Chrome-based browser tab (16). Each time a "TimeGraphContainer" is created, one such context is consumed. We use these contexts for a few things, not just time-line charts (where it makes most sense). This commit takes advantage of the new option and declines that a WebGL context be used for containers we create, except for proper chart views. This means that we will now be able to create about 16 timeline-chart views per session, spread over however many experiments. Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
1 parent 6c8ea91 commit b621692

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

packages/react-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"react-grid-layout": "1.2.0",
3535
"react-modal": "^3.8.1",
3636
"react-virtualized": "^9.21.0",
37-
"timeline-chart": "^0.4.1",
37+
"timeline-chart": "^0.4.2",
3838
"traceviewer-base": "0.8.0",
3939
"tsp-typescript-client": "^0.6.0"
4040
},

packages/react-components/src/components/timegraph-output-component.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,8 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent<Timegr
987987
width: this.getChartWidth(),
988988
backgroundColor: this.props.style.chartBackgroundColor,
989989
lineColor: this.props.style.lineColor,
990-
classNames: 'horizontal-canvas'
990+
classNames: 'horizontal-canvas',
991+
forceCanvasRenderer: false // default, but adds clarity
991992
}}
992993
addWidgetResizeHandler={this.props.addWidgetResizeHandler}
993994
removeWidgetResizeHandler={this.props.removeWidgetResizeHandler}
@@ -1021,7 +1022,8 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent<Timegr
10211022
width: this.getChartWidth(),
10221023
backgroundColor: this.props.style.chartBackgroundColor,
10231024
lineColor: this.props.backgroundTheme === 'light' ? 0xdddddd : 0x34383c,
1024-
classNames: 'horizontal-canvas'
1025+
classNames: 'horizontal-canvas',
1026+
forceCanvasRenderer: false // default, but adds clarity
10251027
}}
10261028
addWidgetResizeHandler={this.props.addWidgetResizeHandler}
10271029
removeWidgetResizeHandler={this.props.removeWidgetResizeHandler}
@@ -1055,7 +1057,8 @@ export class TimegraphOutputComponent extends AbstractTreeOutputComponent<Timegr
10551057
id: 'vscroll',
10561058
width: 10,
10571059
height: parseInt(this.props.style.height.toString()),
1058-
backgroundColor: this.props.style.naviBackgroundColor
1060+
backgroundColor: this.props.style.naviBackgroundColor,
1061+
forceCanvasRenderer: true
10591062
}}
10601063
addWidgetResizeHandler={this.props.addWidgetResizeHandler}
10611064
removeWidgetResizeHandler={this.props.removeWidgetResizeHandler}

packages/react-components/src/components/utils/time-axis-component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export class TimeAxisComponent extends React.Component<TimeAxisProps> {
2828
height: 30,
2929
backgroundColor: this.props.style.chartBackgroundColor,
3030
lineColor: this.props.style.lineColor,
31-
classNames: 'horizontal-canvas'
31+
classNames: 'horizontal-canvas',
32+
forceCanvasRenderer: true
3233
}}
3334
addWidgetResizeHandler={this.props.addWidgetResizeHandler}
3435
removeWidgetResizeHandler={this.props.removeWidgetResizeHandler}

packages/react-components/src/components/utils/time-navigator-component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ export class TimeNavigatorComponent extends React.Component<TimeNavigatorProps>
2626
width: this.props.style.width,
2727
height: 10,
2828
backgroundColor: this.props.style.naviBackgroundColor,
29-
classNames: 'horizontal-canvas'
29+
classNames: 'horizontal-canvas',
30+
forceCanvasRenderer: true
3031
}}
3132
addWidgetResizeHandler={this.props.addWidgetResizeHandler}
3233
removeWidgetResizeHandler={this.props.removeWidgetResizeHandler}

yarn.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11533,9 +11533,9 @@ parse-path@^7.0.0:
1153311533
protocols "^2.0.0"
1153411534

1153511535
parse-uri@^1.0.0:
11536-
version "1.0.9"
11537-
resolved "https://registry.yarnpkg.com/parse-uri/-/parse-uri-1.0.9.tgz#813c2a1107f9e833a12490cb1cb0408a67294b8f"
11538-
integrity sha512-YZfRHHkEZa6qTfPF/xgZ1ErQYCABfud/Vcqp1Q1GNa7RKwv6Oe0YaxXfQQMnQsGdNTo3fwaT0GbVEX7dMAr7tw==
11536+
version "1.0.11"
11537+
resolved "https://registry.yarnpkg.com/parse-uri/-/parse-uri-1.0.11.tgz#3ce39a3102dfe548cc693a914a01a36135063490"
11538+
integrity sha512-nQQNb6GJinexGecJEbfKJdoQ9mbwAHDbYUIDTB0y+DTQaxdZwERtx7LJ631QEBFDXkcxD5+ixBYmt0n2LkWcwQ==
1153911539

1154011540
parse-url@^8.1.0:
1154111541
version "8.1.0"
@@ -13763,10 +13763,10 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8:
1376313763
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
1376413764
integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==
1376513765

13766-
timeline-chart@^0.4.1:
13767-
version "0.4.1"
13768-
resolved "https://registry.yarnpkg.com/timeline-chart/-/timeline-chart-0.4.1.tgz#57cefac6cfa928cd84842cfb5031a157d8bb716e"
13769-
integrity sha512-f5lNTaY4438ml6x4bHdh29/FTXZgMOvunM5FDA1fWocxlq5PCBWvndwSh/HiqOHT0HLuom7jz9juxFtjyFCZmg==
13766+
timeline-chart@^0.4.2:
13767+
version "0.4.2"
13768+
resolved "https://registry.yarnpkg.com/timeline-chart/-/timeline-chart-0.4.2.tgz#7163a911b0d3a9aa398872952aa0c1f40b3abda9"
13769+
integrity sha512-jzI6aDORoA0dTB7SbAJpLFvDwuXD6sy+uVB3BLW4dOwyH2uehDOSJ+uxF1XjBAd7sn2Xxq9oA+aAjiWa2pEc2A==
1377013770
dependencies:
1377113771
"@types/lodash.throttle" "^4.1.4"
1377213772
glob "^7.1.6"

0 commit comments

Comments
 (0)