How to efficiently determine the size of a document (record)?


I have a use case where I have small amounts of data which needs to be appended to the same document (record).

I have read, that the perfomance of appending degrades as the size of the document increases and above 100KB this performance impact might be significant - see

So the strategy would be to start a new document when the old has reached 100KB. The problem is how to tell the size of the document, without everytime reading the whole document to determine its size - to see whether or not it has already reached 100KB.

I was looking at the document (record) metadata, but it seems there is no “size” metadata.

Any strategy to efficiently determine the size of the document (record)?



There is an open enhancement request, but unfortunately at the moment the only way to get the document size is to retrieve the document and count it on the app side.