跳转至

Configure space template generation limits(配置空间模板生成限制)

Template generation is one of Notepad's most powerful and flexible features. It can use row and section generators, enabling users to dynamically populate tables and structured sections from object sets. These templates generate one row or section per object, allowing the document size to scale with the number of objects in the set.

Configuration

in Control Panel, space owners and managers can manage Notepad configuration settings on a space level in for the following features:

  • Maximum number of sections: In top-level and nested generators.
  • Maximum number of rows: In top-level and nested generators.

During template generation, Notepad will adhere to these configured values to control the size of generated templates.

Safeguards

To prevent scale issues, Notepad has implemented the following safeguards.

Prevent degrading Notepad or upstream services

Generating a document from a template involves loading and processing that scales with the number of generated rows/sections. To prevent a rogue template from disrupting Notepad or its dependent services, there is an extra-large hard limit in place. Templates exceeding this limit will fail to generate.

Limits on large documents

Nested generators can easily create documents with a large number of sections, leading to unloadable documents. While not all instances of large document generation need to be safeguarded, an upper bound on configuration limits is in place:

  • Large document generation limit: All generator configurations are capped at 1,000.

中文翻译


配置空间模板生成限制

模板生成是 Notepad 最强大且最灵活的功能之一。它支持使用行生成器和节生成器,使用户能够从对象集动态填充表格和结构化节。这些模板会为每个对象生成一行或一节,使文档大小能够随对象集中的对象数量动态扩展。

配置

在控制面板中,空间(space)的所有者和管理员可以在空间级别管理 Notepad 的配置设置,涉及以下功能:

  • 最大节数: 适用于顶层和嵌套生成器。
  • 最大行数: 适用于顶层和嵌套生成器。

在模板生成过程中,Notepad 将遵循这些配置值来控制生成模板的大小。

安全防护措施

为防止规模问题,Notepad 实施了以下安全防护措施。

防止影响 Notepad 或上游服务性能

从模板生成文档涉及加载和处理操作,其规模会随生成的行数/节数增加而扩大。为防止异常模板干扰 Notepad 或其依赖服务,系统设置了超大的硬性限制。超出此限制的模板将无法生成。

大型文档限制

嵌套生成器容易创建包含大量节的文档,导致文档无法加载。虽然并非所有大型文档生成实例都需要防护,但系统对配置限制设置了上限:

  • 大型文档生成限制: 所有生成器的配置上限均为 1,000。