Open Bug 1683759 Opened 4 years ago Updated 2 years ago

Consider switching to inline localization as soon as context is ready

Categories

(Core :: Internationalization: Localization, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: zbraniecki, Unassigned)

References

Details

Currently, we first finish parsing the document and then localize all its elements.

With the move of Localization to Rust (bug 1660391), we can become more sophisticated and start applying localization onto elements as soon as the context is ready.

This may yield performance improvements since we don't have to place the element in DOM, then wait till the tree is done, then revisit all localization elements and apply translations.

This performance optimization may or may not pay off because we will need to trigger formatMessage per element, rather than a single call to formatMessages with all keys to translate.

But on paper, it seems like that should parallelize more of work and in optimistic scenario where we don't need to lazily trigger fallbacks should improve performance.

Depends on: 1660391
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.