GithubHelp home page GithubHelp logo

Comments (11)

felixmeziere avatar felixmeziere commented on June 3, 2024 2

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.

adrai avatar adrai commented on June 3, 2024

I'm not a TS expert... not easy to make happy everyone...
Feel free to provide a PR...

from i18next.

adrai avatar adrai commented on June 3, 2024

#1883
#2042
#2091

from i18next.

felixmeziere avatar felixmeziere commented on June 3, 2024

This has been preventing us from updating the library for a year as the types are unusable otherwise :(

from i18next.

adrai avatar adrai commented on June 3, 2024

Feel free to provide a PR if you know how this can be improved...
//cc @marcalexiei

from i18next.

marcalexiei avatar marcalexiei commented on June 3, 2024

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.

felixmeziere avatar felixmeziere commented on June 3, 2024

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.

felixmeziere avatar felixmeziere commented on June 3, 2024

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.

marcalexiei avatar marcalexiei commented on June 3, 2024

@felixmeziere you can open the PR now if you wish, so we can test you patch against the current types test

from i18next.

felixmeziere avatar felixmeziere commented on June 3, 2024

I'll open it as draft without comments or anything then

from i18next.

marcalexiei avatar marcalexiei commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.