summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--CHANGELOG.md7
-rw-r--r--client/components/boards/boardsList.js7
-rw-r--r--client/components/main/layouts.js4
3 files changed, 11 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e4cba3bb..6f270259 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,9 +6,10 @@ This release adds the following new features:
and fixes the following bugs:
-* [Fix: User with comment only permissions can remove another user from a card](https://github.com/wekan/wekan/pull/1352).
+* [User with comment only permissions can remove another user from a card](https://github.com/wekan/wekan/pull/1352);
+* [Frequent Subscriptions problem that make Excessive CPU usage](https://github.com/wekan/wekan/pull/1363).
-Thanks to GitHub user nztqa for contributions.
+Thanks to GitHub users mfshiu and nztqa for their contributions.
# v0.59 2017-11-23 Wekan release.
@@ -64,7 +65,7 @@ This release adds the following new features:
and fixes the following bugs:
-* [Emoji detection breaks MAC addresses](https://github.com/wekan/wekan/issues/1248);
+* [Emoji detection breaks MAC addresses](https://github.com/wekan/wekan/issues/1248); - this has not yet fixed all cases.
* [Codeblocks should not be scanned for emoji](https://github.com/wekan/wekan/issues/643);
* [Whitespace trimming breaks Markdown code block indentation](https://github.com/wekan/wekan/issues/1288):
* [Helper to list boards for user](https://github.com/wekan/wekan/pull/1327);
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,
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index 1936d7aa..04a22624 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -1,7 +1,3 @@
-Meteor.subscribe('boards');
-Meteor.subscribe('setting');
-Meteor.subscribe('user-admin');
-
BlazeLayout.setRoot('body');
const i18nTagToT9n = (i18nTag) => {