跳转至

Performance considerations for parameter configuration(参数配置的性能考量)

Dependencies between parameters, such as in the definitions of default values and multiple-choice options, can impact the time that it takes for an action form to load. For example, consider the following action parameter configuration:

  1. The first parameter is an object reference with a from single result of object set default value.
  2. The second parameter is a string with a default value that is an object parameter property referencing the first parameter.
  3. The third parameter is also a string, with no default value, but configured as a multiple choice dropdown using get options from an object set. The object set definition references the second parameter.

When a user loads an action form for this action, multiple operations need to be performed iteratively.

  1. First, the default value for the first parameter needs to be retrieved.
  2. Then, the second parameter's default value needs to be derived from the first parameter value.
  3. Finally, the options for the third parameter need to be derived from the second parameter value.

When configuring action parameters, it is recommended to keep the dependency hierarchy as flat as possible. In the context of the action described above, referencing the first parameter instead of the second parameter in the third parameter's object set definition would allow the necessary information for the second and third parameter to be derived in parallel, reducing the total latency between opening the form and the form being fully interactive.


中文翻译

参数配置的性能考量

参数之间的依赖关系(例如在默认值多选选项的定义中)可能会影响操作表单(action form)的加载时间。例如,考虑以下操作参数配置:

  1. 第一个参数是一个对象引用(object reference),其默认值为来自对象集的单条结果(from single result of object set)。
  2. 第二个参数是一个字符串,其默认值为对象参数属性(object parameter property),引用了第一个参数。
  3. 第三个参数也是一个字符串,没有默认值,但配置为使用从对象集获取选项(get options from an object set)的多选下拉菜单(multiple choice dropdown)。该对象集定义引用了第二个参数。

当用户加载此操作的操作表单时,需要迭代执行多个操作:

  1. 首先,需要检索第一个参数的默认值。
  2. 然后,需要根据第一个参数的值推导出第二个参数的默认值。
  3. 最后,需要根据第二个参数的值推导出第三个参数的选项。

在配置操作参数时,建议尽可能保持依赖层级扁平化。就上述操作而言,如果在第三个参数的对象集定义中引用第一个参数而非第二个参数,则第二个和第三个参数所需的信息可以并行推导,从而减少从打开表单到表单完全可交互之间的总延迟时间。