Skip to content

Back LocalizationPart's LazyFields with Infoset #8692

@MatteoPiovanelli

Description

@MatteoPiovanelli

The LazyFields in LocalizationPart are "backed" by information in the LocalizationPartRecord. In the Loader and Setter for those LazyFields we are currently referring directly to properties of the Record.

protected static void PropertySetHandlers(ActivatedContentContext context, LocalizationPart localizationPart) {

As a consequence, whenever there is a ContentItem that has a LocalizationPart and we need to access one of those properties, a query has to be performed. This happens often when displaying multi-language websites that rely on localized content and widgets: we easily end up having 10+ queries for that to visualize a simple page.

It seems trivial to use Store/Retrieve methods in the Loader and Setter for those LazyFields.
I have a PR coming soon for this. I've tested it a little, and it seems to work for all cases I've put it through, but localization is a complex topic so I'm not yet 100% sure I've covered all corner cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions