From d2dd1d9f227f6c9afd8c2da425401e035027d5ad Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 2 Sep 2021 17:13:43 +0200 Subject: [PATCH] Governance System Perfmance Improvement --- Network/.vscode/settings.json | 16 ++++++++++++++++ .../UI/Spaces/User-Profile-Space/UserProfile.js | 14 ++++++++++---- TaskServer/.vscode/settings.json | 16 ++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 Network/.vscode/settings.json create mode 100644 TaskServer/.vscode/settings.json diff --git a/Network/.vscode/settings.json b/Network/.vscode/settings.json new file mode 100644 index 000000000..0bf7da203 --- /dev/null +++ b/Network/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "files.exclude": { + "**/Data-Storage": true, + "**/Documentation": true, + "**/Log-Files": true, + "**/node_modules": true, + "**/Deprecated-Code": true + }, + "search.exclude": { + "**/Data-Storage": true, + "**/Documentation": true, + "**/Log-Files": true, + "**/Deprecated-Code": true + }, + "search.maintainFileSearchCache": true +} \ No newline at end of file diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 991feae51..8aa24af72 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -16,11 +16,18 @@ function newGovernanceUserProfileSpace() { let waitingForResponses = 0 const BSC_SCAN_RATE_LIMIT_DELAY = 6000 + const DISTRIBUTION_PROCESS_RECALCULATION_DELAY = 5000 + let intervalId let reputationByAddress = new Map() return thisObject function initialize() { + /* + Here we will run the distribution process, that in turn will run all the programs. + */ + intervalId = setInterval(UI.projects.governance.functionLibraries.distributionProcess.calculate, DISTRIBUTION_PROCESS_RECALCULATION_DELAY) + /* Here we will get a list of all github usernames who have a star or fork and are watching the Superalgos Repository. This will later be used to know which user profiles are participating @@ -292,6 +299,9 @@ function newGovernanceUserProfileSpace() { } function finalize() { + clearInterval(intervalId) + intervalId = undefined + thisObject.githubStars = undefined thisObject.githubWatchers = undefined thisObject.githubForks = undefined @@ -320,10 +330,6 @@ function newGovernanceUserProfileSpace() { function physics() { if (UI.projects.foundations.spaces.designSpace.workspace === undefined) { return } /* - Here we will run the distribution process, that in turn will run all the programs. - */ - UI.projects.governance.functionLibraries.distributionProcess.calculate() - /* Load the user profiles with Token Power. */ let userProfiles = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') diff --git a/TaskServer/.vscode/settings.json b/TaskServer/.vscode/settings.json new file mode 100644 index 000000000..0bf7da203 --- /dev/null +++ b/TaskServer/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "files.exclude": { + "**/Data-Storage": true, + "**/Documentation": true, + "**/Log-Files": true, + "**/node_modules": true, + "**/Deprecated-Code": true + }, + "search.exclude": { + "**/Data-Storage": true, + "**/Documentation": true, + "**/Log-Files": true, + "**/Deprecated-Code": true + }, + "search.maintainFileSearchCache": true +} \ No newline at end of file