Directive "v-t" rendering slower than "$t" #1650
zemkogabor
started this conversation in
General
Replies: 1 comment
-
Noticed this as well and found the issue, figured I'd leave it here in case it's found by somebody else.
When you use the It only gets worse the more your translations file grows. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When rendering more than 50 elements, the v-t directive is noticeably slower.
The language key exists, no warning in console output.
Using
<span v-text="$t('shop.item.card.ask')" />
instead ofv-t
then it's much faster.According to the documentation, v-t should be even faster: https://kazupon.github.io/vue-i18n/guide/directive.html#t-vs-v-t
System info:
Screenshots
v-t 1000 element:
$t 1000 element:
Beta Was this translation helpful? Give feedback.
All reactions