We discovered a performance problem in our application and found $i18nextTanslate to be the culprit. It makes a deep copy of the global options for every translation. In our application, the global options contain all translations (which is one of the supported ways to provide the translations). So every time the function is called, all translations get copied.
Since the copy is only made to overwrite the ns field, a shallow copy is sufficient and much faster.
We discovered a performance problem in our application and found $i18nextTanslate to be the culprit. It makes a deep copy of the global options for every translation. In our application, the global options contain all translations (which is one of the supported ways to provide the translations). So every time the function is called, all translations get copied.
Since the copy is only made to overwrite the ns field, a shallow copy is sufficient and much faster.