You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performance is affected when using more and more messages in vue-i18n
Hello,
I stumbled upon a performance issue when using wrapper.setProps and vue-i18n. For some reasons, tests are running slower and slower with the increased amount of entries (0 -> 3000 lines) in vue-i18n messages (translations), eventually ending up in a RangeError. I know some people will tell me that I could either mock or get rid of vue-i18n in my test, but it is very convenient to do so to track untranslated messages in a vue app. At my company we are using it extensively. Moreover, I don't think we should experience this kind a performance issue anyway and that let me believe this is a code smell in the way test-utils reorders dependencies.
without message + with 1000 lines messages
with 3000 lines messages
NB: using a wrapper factory instead of setProps is fixing the issue as well.
Thanks
The text was updated successfully, but these errors were encountered:
This issue is caused by the implementation of synchronous updating. This will be fixed after the next patch of Vue is released (Vue 2.5.18). In the meantime you can run your tests with sync set to false:
Version
1.0.0-beta.26
Reproduction link
https://github.com/AlexandreBonaventure/repro-test-utils-setProps
Steps to reproduce
git clone https://github.com/AlexandreBonaventure/repro-test-utils-setProps
>yarn install
>yarn test:unit
What is expected?
No performance issue across all tests
What is actually happening?
Performance is affected when using more and more messages in vue-i18n
Hello,
I stumbled upon a performance issue when using wrapper.setProps and vue-i18n. For some reasons, tests are running slower and slower with the increased amount of entries (0 -> 3000 lines) in vue-i18n messages (translations), eventually ending up in a RangeError. I know some people will tell me that I could either mock or get rid of vue-i18n in my test, but it is very convenient to do so to track untranslated messages in a vue app. At my company we are using it extensively. Moreover, I don't think we should experience this kind a performance issue anyway and that let me believe this is a code smell in the way test-utils reorders dependencies.
without message + with 1000 lines messages
with 3000 lines messages
NB: using a wrapper factory instead of setProps is fixing the issue as well.
Thanks
The text was updated successfully, but these errors were encountered: