Răsfoiți Sursa

Fix: Frequent Subscriptions problem that make Excessive CPU usage.
Thanks to mfshiu ! Closes #1096, Closes wekan/wekan-mongodb#2

Lauri Ojansivu 7 ani în urmă
părinte
comite
7e4b42e9b3
3 a modificat fișierele cu 11 adăugiri și 7 ștergeri
  1. 4 3
      CHANGELOG.md
  2. 7 0
      client/components/boards/boardsList.js
  3. 0 4
      client/components/main/layouts.js

+ 4 - 3
CHANGELOG.md

@@ -6,9 +6,10 @@ This release adds the following new features:
 
 
 and fixes the following bugs:
 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.
 # v0.59 2017-11-23 Wekan release.
 
 
@@ -64,7 +65,7 @@ This release adds the following new features:
 
 
 and fixes the following bugs:
 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);
 * [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):
 * [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);
 * [Helper to list boards for user](https://github.com/wekan/wekan/pull/1327);

+ 7 - 0
client/components/boards/boardsList.js

@@ -1,6 +1,13 @@
 const subManager = new SubsManager();
 const subManager = new SubsManager();
 
 
 BlazeComponent.extendComponent({
 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() {
   boards() {
     return Boards.find({
     return Boards.find({
       archived: false,
       archived: false,

+ 0 - 4
client/components/main/layouts.js

@@ -1,7 +1,3 @@
-Meteor.subscribe('boards');
-Meteor.subscribe('setting');
-Meteor.subscribe('user-admin');
-
 BlazeLayout.setRoot('body');
 BlazeLayout.setRoot('body');
 
 
 const i18nTagToT9n = (i18nTag) => {
 const i18nTagToT9n = (i18nTag) => {