Coder Social home page Coder Social logo

Comments (3)

kuzhelov avatar kuzhelov commented on May 18, 2024

Key takeaways

  • major impact is provided by enabled strictNullCheck TS compiler flag
    • skipLibCheck, skipDefaultLibCheck, noStrictGenericChecks
  • while yes, we can fix types for this PR and 'resolve' CI build issue for it, with that we will effectively agree that stability of our build infrastructure is dependent on the code we are providing in sources (?!)
  • introduce larger allocation size limits helps, but only for the case where 'strictNullCheck' is disabled

Proposed solutions/mitigation strategies

  • disable strictNullCheck flag as a mitigation step (#157)
    • increase memory limits
    • run build tasks (for sources and docs) sequentially

Details

Here are the results from the investigation process held by me and @miroslavstastny. Essentially, the following approaches were tries to solve the problem (results from all of them were subsequently monitored by running process with trace_gc flag):

  • increase memory size available for heap allocation (max_old_space_size flag)
    • although memory size was increased, this move haven't resulted in problem being solved: all the available space was consumed by build tasks (docs + sources, simultaneously), and subsequent allocation requests fail. Worth to notice that gradient of allocation size growth is quite impressive - we do not even reaching plato at this point
  • our next thought was about problems with build process pipeline. We've tried to limit amount of concurrently running tasks, the simplest move - to make sources and docs run sequentially. This hasn't solved the problem or made any effect on amount of memory consumed
  • next thing that has been tried - remove strictNullCheck flag from TS compiler config. This has resulted in much moderate memory consumption by the compiler, with even default threshold being never exceeded (irregardless of whether sources were built in parallel with docs or not)

cc: @levithomason, @miroslavstastny

from fluent-ui-react.

kuzhelov avatar kuzhelov commented on May 18, 2024

as problem is reproing only for docs build, maybe it makes sense to apply disabled strictNullChecks flag only for the docs files? However, problem's scope should be strictly defined first..

from fluent-ui-react.

kuzhelov avatar kuzhelov commented on May 18, 2024

will be addressed and tracked by #184, closing

from fluent-ui-react.

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.