Comments (11)
Hi, we think we have found the culprit for this regression. It is linked with the ternary in FilterKeysByContext
that gets evaluated all the time for no reason. We will work with our fix (that moves the ternary up and caches a value) for 2-3 weeks and report back here with a PR if everything works as expected!
from i18next.
I'm not a TS expert... not easy to make happy everyone...
Feel free to provide a PR...
from i18next.
from i18next.
This has been preventing us from updating the library for a year as the types are unusable otherwise :(
from i18next.
Feel free to provide a PR if you know how this can be improved...
//cc @marcalexiei
from i18next.
As always, for this kind of issues, a minimal reproduction example would be helpful.
BTW I donโt know if something more can be done to improve memory usage, so if anyone has some ideas a PR would be highly appreciated.
from i18next.
This issue in the typescript repo mentions i18next a lot microsoft/TypeScript#53087 and is the exact problem we have. What explodes between previous versions of i18next and this is the number of type instantiations and memory usage (from `tsc -d --diagnostics).
I've tried to reproduce the conditions of my repo in a new repo but didn't succeed : it could be due to a lot of different things. Only thing I know is that with i18next version pre-v23 tsc
runs like a charm but crashes after that...
from i18next.
Here is what seems to do the trick in the meantime in case someone wants to have a look master...GreenGoTech:i18next:master
from i18next.
@felixmeziere you can open the PR now if you wish, so we can test you patch against the current types test
from i18next.
I'll open it as draft without comments or anything then
from i18next.
A fix with the issue of memory usage has been added via #2166 and is available in v23.11.0
from i18next.
Related Issues (20)
- Ideas: improve CI HOT 2
- changeLanguage update i18n.language even if http-backend fails to load translations? HOT 1
- One and Other plurals do not seem to be working correctly HOT 1
- refactor: dedupe content between t.d.ts and t.v4.d.ts HOT 4
- Interpolation of multiple datetimes doesn't respect the format params HOT 2
- Support pluralization rules for constructed languages (conlangs) HOT 2
- Correct usage of returnObjects with TypeScript is not documented HOT 4
- t.v4.d.ts:189:47 - error TS1005: '?' expected HOT 4
- skipOnVariable not working for non key input in `t` HOT 3
- 23.7.13 -> 23.7.14 Regression with 'Type instantiation is excessively deep and possibly infinite' HOT 3
- Translations are not working when network connection is down HOT 4
- ASCII Decoding HOT 1
- Correct way to use i18n.t() inside index.ts files in React + TypeScript application HOT 2
- RangeError: Maximum call stack size exceeded at deepExtend HOT 2
- i18next::backendConnector: TypeError: Failed to parse URL HOT 1
- Get the wrong API call HOT 3
- React Hook "useEffect" is called conditionally. React Hooks must be called in the exact same order in every component render. HOT 3
- getFixedExists should support function getFixedT HOT 1
- Error: You are passing a wrong module! Please check the object you are passing to i18next.use() HOT 1
- The โconstโ keyword is extraneous in the ParseKeys type definition. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i18next.