Git Product home page Git Product logo

Comments (8)

crutchcorn avatar crutchcorn commented on May 29, 2024

What's happening here is that, while our types are correct - they are extremely complex. Complex enough that we have to add an edgecase for only calculating a specific depth (in our case, 3 deep) so that TypeScript doesn't break.

This string is reading that 3-level depth and therefore breaking.

Tagging in our type-level perf expert @tannerlinsley to see if we can get together to investigate a potential fix

from form.

tannerlinsley avatar tannerlinsley commented on May 29, 2024

I’ll take a look

from form.

tannerlinsley avatar tannerlinsley commented on May 29, 2024

@chorobin might even be a better fit here. He knows way more about perf

from form.

chorobin avatar chorobin commented on May 29, 2024

Looking briefly I can see a few things that could be more efficient. I don't think these types are tail recursive optimised, is this why TS was breaking and you had to add a depth limit? Usually there's a recursive limit up to 100 with non-optimised and 1000 optimised.

from form.

dawsonbooth avatar dawsonbooth commented on May 29, 2024

If the depth limit can be modified (by manually adding types to extend it or otherwise), then it might make sense to choose a limit that is far beyond what could be reasonably expected for the form state, like 10 or so.

from form.

crutchcorn avatar crutchcorn commented on May 29, 2024

@chorobin the reason we limited depth was due to TS seemingly running into OOM problems without it. Help debugging would be immensely helpful

from form.

chorobin avatar chorobin commented on May 29, 2024

Do we have a reproducer of the OOM errors?

from form.

crutchcorn avatar crutchcorn commented on May 29, 2024

Confirmed to be fixed by #680! Thanks @chorobin 😄😄😄

from form.

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.