尽管根目录为空,但仍超出Drive Realtime API模型的大小限制 [英] Drive Realtime API model size limit exceeded despite empty root

查看:59
本文介绍了尽管根目录为空,但仍超出Drive Realtime API模型的大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个驱动器文件,该文件似乎具有实时文档已损坏或泄漏.

I have a drive file that seems to have a corrupted or leaky realtime document.

当我调用realtimeDocument.getModel().getRoot().toString()时,输出为 {slides:[]} ,但是当我尝试插入新幻灯片时(自定义对象具有10或15个小的字符串属性),我收到大小限制错误.

When I call realtimeDocument.getModel().getRoot().toString(), the output is {slides: []}, but when I try to insert a new slide (a custom object with 10 or 15 small string properties), I get a size limit error.

Model size limit has been exceeded. Used: 10681723 bytes; Limit: 10485760 bytes

有没有一种方法可以重新初始化实时文档,或者以其他方式对其进行修剪?

Is there a way I can reinitialize the realtime document or otherwise get it to trim itself down?

这似乎只发生在一个文件中-我的所有其他文件在实时文档大小和模型复杂性之间都有合理的映射.

This only seems to be happening in one file - all of my other files have reasonable mappings between realtime document size and model complexity.

推荐答案

您以前是否创建并从文档中删除了很多对象?当前,每个CollaborativeObject都会永久保留在模型中.因此,从根目录删除它实际上并没有释放空间.(这是因为对象可以通过协作者的操作或撤消而重新附加到根.)

Have you previously created and removed a lot of objects from the document? Currently each CollaborativeObject persists in the model forever. Thus, removing it from the root doesn't actually free up the space. (This is because objects can become reattached to the root via collaborator actions or undo.)

在正常操作中,这通常不应该是问题,但是如果您不断创建和删除对象,则可能会遇到问题.

In normal operations this shouldn't generally be a problem, but if you are constantly creating and removing objects you could run into issues.

这篇关于尽管根目录为空,但仍超出Drive Realtime API模型的大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆