From a363b62f23d1feeea908bd4f830c605167206a62 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Thu, 25 May 2017 09:31:36 +0100 Subject: [PATCH] Remove periodic polling of document for labels --- .../public/coffee/ide/labels/LabelsManager.coffee | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/services/web/public/coffee/ide/labels/LabelsManager.coffee b/services/web/public/coffee/ide/labels/LabelsManager.coffee index 2a6950677c..fa86414139 100644 --- a/services/web/public/coffee/ide/labels/LabelsManager.coffee +++ b/services/web/public/coffee/ide/labels/LabelsManager.coffee @@ -1,8 +1,6 @@ define [ ], () -> - AUTOMATIC_REFRESH_PERIOD = 1000 * 60 * 10 - class LabelsManager constructor: (@ide, @$scope) -> @$scope.$root._labels = this @@ -11,26 +9,15 @@ define [ documents: {} # map of DocId => List[Label] @loadLabelsTimeout = null - @periodicLoadInterval = null setTimeout( () => - # set up a regular re-load - setTimeout( - () => - @periodicLoadInterval = setInterval( - () => - @loadLabelsFromOpenDoc() - , AUTOMATIC_REFRESH_PERIOD - ) - , AUTOMATIC_REFRESH_PERIOD - ) # listen for document open @$scope.$on 'document:opened', (e, doc) => setTimeout( () => @scheduleLoadLabelsFromOpenDoc() - , 1000 + , 0 ) , 0 )