diff --git a/src/components/gui/gui.jsx b/src/components/gui/gui.jsx index 488e705e88db5ce7cb76a4cc320446b0dab1b35b..da08720d13512a92b53d63934a81b72bef68c4c4 100644 --- a/src/components/gui/gui.jsx +++ b/src/components/gui/gui.jsx @@ -33,6 +33,10 @@ const messages = defineMessages({ } }); +// Cache this value to only retreive it once the first time. +// Assume that it doesn't change for a session. +let isRendererSupported = null; + const GUIComponent = props => { const { activeTabIndex, @@ -66,7 +70,9 @@ const GUIComponent = props => { tabSelected: classNames(tabStyles.reactTabsTabSelected, styles.isSelected) }; - const isRendererSupported = Renderer.isSupported(); + if (isRendererSupported === null) { + isRendererSupported = Renderer.isSupported(); + } return ( <Box