New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve "Frequent Subscriptions" problem that make Excessive CPU usage #1363

Closed
wants to merge 10 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@mfshiu
Copy link

mfshiu commented Nov 27, 2017

I found the solution. The problem is "Frequent Subscriptions" in top of client\components\main\layouts.js

Meteor.subscribe('boards');
Meteor.subscribe('setting');
Meteor.subscribe('user-admin');

I move these code to top of client\components\boards\boardList.js

BlazeComponent.extendComponent({
onCreated() {
Meteor.subscribe('boards');
Meteor.subscribe('setting');
Meteor.subscribe('user-admin');
},

CPU is no longer too high, from 100% down to 30% - 50%.
The subscriptions at top of layouts.js will make boards data sync every where, it's the reason that cause CPU heavy when user number is increased. To move it to creation time of boardList.js, there is the only place that boards data needed, all boards data will not sync when user enter a board or card.
I will try to update the code or you can told me how to do that.


This change is Reviewable

xet7 and others added some commits Nov 1, 2017

Merge branch 'devel'
Conflicts:
	CHANGELOG.md
	package.json
	sandstorm-pkgdef.capnp
Merge branch 'devel'
Conflicts:
	sandstorm-pkgdef.capnp
Resolve "Frequent Subscriptions" in top of
sh: wq: command not found
@CLAassistant

This comment has been minimized.

Copy link

CLAassistant commented Nov 27, 2017

CLA assistant check
All committers have signed the CLA.

@xet7

This comment has been minimized.

Copy link
Member

xet7 commented Nov 29, 2017

I did merge manually at 7e4b42e , not taking your time to clean up pull request etc. Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment