Skip to content

workspace module cacheTemplates performance #2725

Description

@dbauszus-glx

The workspace module has a cacheTemplates method which parses the workspace, fetches every template from its source in order to compile a complete workspace. Roles will be ignored in this composition to ensure that every template is cached and the complete nested role structure can be discovered. This method is required to request the roles tree and to test the use of templates.

This method is not performing well since locales are awaited to ensure that the same template referenced in multiple locales is not fetched multiple times. At current the each locale is awaited for every layer to load.

The method can be improved by parsing the workspace every src property and cache these templates. Then iterate of src properties which may have been added from templates fetched until every template has been cached.

A src map should be created to avoid circular reference where the same src is defined in a template that calls itself.

Metadata

Metadata

Labels

CodeIssues related to the code structure and performance.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions