Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
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