We’re making a method call to download a roughly 20MB json array. We do this using a very simple query and a basic method call. We don’t want this data to be reactive, we store it for use offline via our own framework.
But the call is slow, 10 seconds when running locally and over 1 minute running on Modulus. We’re looking for ways to optimise this. Is using a Method call the way to go? If we don’t need reactive functionality is a plain HTTP Get going to be faster?
Also, does anyone know if a Method call like this includes compression?
Just in case, here’s some code. Under /server
we have
Meteor.methods({
getBigDataFile: function(myId) {
var query = {
'someid': myId,
};
return BigData.find(query).fetch();
}
});
We call it using
Meteor.call('getBigDataFile', theId, function(err, result){
// We store the data offline here
});
Thanks