From 00933d23f5a70e11ce2d7bd1a263429c2cfba582 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Fri, 8 Mar 2024 16:39:53 -0800 Subject: [PATCH] Add documentation highlighting potential performance concerns --- libs/components/src/i18n/i18n.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/components/src/i18n/i18n.component.ts b/libs/components/src/i18n/i18n.component.ts index b48843e35d9..aa69696af33 100644 --- a/libs/components/src/i18n/i18n.component.ts +++ b/libs/components/src/i18n/i18n.component.ts @@ -31,6 +31,11 @@ interface I18nStringPart { * bit-i18n-part. If there are not enough bit-i18n-part directives, the text will be rendered as-is for the remaining * tags. * + * ## Caution + * Care should be taken if this directive is included in large tables/lists. It can cause performance issues + * when there are many 1000s being rendered at once without optimizations like *cdkVirtualFor. In such cases, it is + * recommended to use the i18n pipe instead and avoid including templates within the translated content. + * * @example *
* {{ text }}