From 88c39584196bb2d1306fe6a13eebfa91b8a454e7 Mon Sep 17 00:00:00 2001 From: Alexandru Stefan Date: Wed, 24 Nov 2021 17:59:46 +0200 Subject: [PATCH 1/2] removed code completion for market/exchange objects due to high memory consumption --- .../Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js index 1580e85e2..6903592ad 100644 --- a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js +++ b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js @@ -346,9 +346,11 @@ function newFoundationsCodeEditorEditorPage() { * We will provide auto-complete only for assets pair found in Markets * Doing so we will avoid providing completion for assets that are not used in a market */ + + //TODO: Disabled on purpose, causes high memory consumption when multiple exchanges are loaded let market = marketPrefix + baseAsset + dot + quotedAsset + dot + chartObj - stringObjects.push(market) - stringObjects.push(exchangePrefix + exchangeName + dot + market) + // stringObjects.push(market) + // stringObjects.push(exchangePrefix + exchangeName + dot + market) }) }) }) From e31699a3a499097980bee698b7f9ff885f2f4257 Mon Sep 17 00:00:00 2001 From: Alexandru Stefan Date: Wed, 24 Nov 2021 18:03:23 +0200 Subject: [PATCH 2/2] removed the entire loop for market/exchange completion objects --- .../Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js index 6903592ad..c73040b9d 100644 --- a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js +++ b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js @@ -332,7 +332,7 @@ function newFoundationsCodeEditorEditorPage() { }) // Enrich chart data with market and exchange structure - UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes.forEach(node => { +/* UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes.forEach(node => { if (node.type === 'Crypto Ecosystem') { node.cryptoExchanges.forEach(cxs => { cxs.exchanges.forEach(exchange => { @@ -342,10 +342,10 @@ function newFoundationsCodeEditorEditorPage() { let baseAsset = marketPair.split('/')[0] let quotedAsset = marketPair.split('/')[1] stringObjects.forEach(chartObj => { - /** + /!** * We will provide auto-complete only for assets pair found in Markets * Doing so we will avoid providing completion for assets that are not used in a market - */ + *!/ //TODO: Disabled on purpose, causes high memory consumption when multiple exchanges are loaded let market = marketPrefix + baseAsset + dot + quotedAsset + dot + chartObj @@ -356,7 +356,7 @@ function newFoundationsCodeEditorEditorPage() { }) }) } - }) + })*/ //Actually building the objects for chart, market and exchange, no need for multiple objects, as one is enough for the autocomplete to work stringObjects.forEach(stringRepresentation => {