The Realtime API limits the maximum sizes of Realtime documents and individual changes. These limits are:
- Total Realtime document size: 10 MB (10*2^10 bytes)
- Maximum change size: 500 KB
A change that exceeds either of these limits results in an exception. To check
the size of the Realtime document, check the
Here are some things you can do to optimize your application's performance:
Avoid creating throw away collaborative objects. A
CollaborativeObjectis never fully deleted from the document. You can, however, delete the contents of a collaborative object to free up space. Minimizing temporary object creation will minimize garbage in the model.
Make non-collaborative objects as small as possible, particularly if they change frequently. When you make a change to the Realtime model, the change is sent to the server and other collaborators as a delta to the existing data model. Typically this results in good performance since we send the minimal amount of information necessary for the others to process the change.
Avoid storing large binary objects, like images, within the data model. Instead, you can link to files stored separately in Google Drive, or on an external server.