Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

v-t rendering improvements #1713

Open
wants to merge 2 commits into
base: v8.x
Choose a base branch
from
Open

v-t rendering improvements #1713

wants to merge 2 commits into from

Conversation

liam-megaport
Copy link

I opened this MR to fix #1712

I was initially going to remove doing a looseClone when doing a lookup at https://github.com/kazupon/vue-i18n/blob/v8.x/src/directive.js#L17, but I thought this could cause a regression if objects get reused and I thought we could reduce the cpu/memory footprint too when update is called. I decided to switch it to use a timestamp as this should still allow updating when "setLocaleMessage" or "mergeLocaleMessage" is called with no extra overhead.

From testing this MR, it is still slower than $t() by about half, but it is about ~20-30x faster compared to the performance tests in #1712.

I am open to feedback and improving it as it might not be the optimal solution,
I had to bump chromedriver as tests were failing due to version mismatch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v-t rendering is slower than $t()
1 participant