summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardsList.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-11-29 11:23:49 +0200
committerLauri Ojansivu <x@xet7.org>2017-11-29 11:23:49 +0200
commit7e4b42e9b3482460cac77a603809a8b5d4016477 (patch)
treef5f0b93ac5eede545f7b8f50c1b3b69e7cd27426 /client/components/boards/boardsList.js
parentc609096700af41b4f4a190fb71d3ae07c898e6a9 (diff)
downloadwekan-7e4b42e9b3482460cac77a603809a8b5d4016477.tar.gz
wekan-7e4b42e9b3482460cac77a603809a8b5d4016477.tar.bz2
wekan-7e4b42e9b3482460cac77a603809a8b5d4016477.zip
Fix: Frequent Subscriptions problem that make Excessive CPU usage.
Thanks to mfshiu ! Closes #1096, Closes wekan/wekan-mongodb#2
Diffstat (limited to 'client/components/boards/boardsList.js')
-rw-r--r--client/components/boards/boardsList.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index 4ec4b534..6c9600a1 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -1,6 +1,13 @@
const subManager = new SubsManager();
BlazeComponent.extendComponent({
+ onCreated() {
+ // Here is the only place that boards data needed, all boards data will stop sync when leaving this template.
+ Meteor.subscribe('boards');
+ Meteor.subscribe('setting');
+ Meteor.subscribe('user-admin');
+ },
+
boards() {
return Boards.find({
archived: false,