Get subscription dataset size

Is there a way to determine the size of the data in bytes received via a subscription? Chrome profiler doesn’t distinguish any of the sort…

1 Like

bump
anyone?

I don’t know if you can do that, but one useful information is the number of documents you have in your collection client side, usually many documents = much data.

Generally a collection is just a list of object so what you could do is just take all JSON objects, convert them to strings and then try to measure them:

It will not be an exact science but will allow you to compare some things.

1 Like

You can try with Fiddler or Wireshark and do some filter by the subscriptionId…
The DDP payload is a little more verbose than the serialized doc and be sure if the size you are seeing is zipped or not because now Meteor use WebSockets with per-message deflate.