-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
We are using this package in production and we are experiencing huge memory leaks.
When I continuously update the items that are subscribed in this publication then the memory is continuously increasing and server is getting crashed.
Our publication looks like this
Meteor.publish("getTwoLevelTests", function getTwoLevelTests(query) {
this.autorun(function (computation) {
let item = Test.findOne({ "_id": query._id }, { fields: { "links": 1 } });
let itemIds = [];
if (item && item.links) {
item.links.forEach((link) => { link.linkedItemId && !itemIds.includes(item.linkedItemId) && itemIds.push(item.linkedItemId) });
}
return Test.find({ companyId: query.companyId,"links.linkedItemId": { $in: itemIds } })
});
});
When I try to upgrade to latest version (0.4.0) of peerlibrary:reactive-publish I am getting this error "ReferenceError: ReactiveVar is not defined"
Can someone help here ?