Skip to content
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

Handle large role collection by persisting on client when user is logged it. #332

Open
danyhiol opened this issue Feb 27, 2021 · 3 comments

Comments

@danyhiol
Copy link

I have a very complex and large role collection. Since these permissions are needed when the user is logged in, it takes quite some time for my application to load. I have more than 300 inherited roles and this may actually grow larger.
Is there a way to persist roles on the client and only read from the client as long as the user is logged in? This package actually helps in persisting the roles on the client.
But how can I connect the role package to this persisted collection on the client?

@SimonSimCity
Copy link
Member

I don't know if I quite correctly understand the problem you're facing. Would disabling the synchronization of the roles collection fix it? You'd then be responsible yourself to see whether and when you need it and publish it (see #256).

@danyhiol
Copy link
Author

danyhiol commented Mar 3, 2021

The main idea is to get the subscription only once when the user is connected. And persist the data on the client and use them from there. If disabling synchronization doesn't stop the roles from working, then yes.

@SimonSimCity
Copy link
Member

Thanks for the response. To me, personally, this is an improvement Meteor should bring. It might also be already suficcient to transfer as little data as possible to the client - maybe you can do what you want already by omitting the roles alltogether or focus on using methods when you have to access/query a vast amount of data.

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

No branches or pull requests

2 participants