Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler Optimization Umbrella #9223

Open
11 tasks
sebmarkbage opened this issue Mar 20, 2017 · 0 comments
Open
11 tasks

Compiler Optimization Umbrella #9223

sebmarkbage opened this issue Mar 20, 2017 · 0 comments
Labels

Comments

@sebmarkbage
Copy link
Collaborator

sebmarkbage commented Mar 20, 2017

Spinoff from reactjs/react-future#50

I wanted to create an umbrella task for when we start working on compiler level optimizations. We've had a tag open for a while but these are fairly primitive optimizations. We want to be able to go further.

I don't think we'll start this project immediately but soon after the Fiber stuff is in place.

Compiler Infra

  • Base-line cross-module full JavaScript AOT compiler.
  • Compiler infra structure that fits well into existing tooling at FB, Webpack, Rollup based ecosysem etc. Support parallelism and incremental builds.
  • Solve things like what the npm ecosystem should do. Compile before publishing or after? Probably after.

Optimizations

  • Enable multiple levels of host instances / DOM elements to be managed by a single Fiber. I think this is probably a key requirement for many optimizations. I'm not sure if that Fiber's children will have a single placement point (the parent that they get inserted into) or if it could have multiple insertion points. If it manually does the insertion of its children, then the later would work.
  • Optimizing pure host/DOM elements ("string" components). Can be reasoned about at the core compiler level.
  • Inlining pure functional components so that now the result can be reasoned about as a flat component.
  • Basic constant folding for static configuration.
  • Optimizing across component boundaries without inlining.
  • Optimizing stateful functional components.

Runtime Optimizations

  • Dead-code elimination of library code that isn't needed by a particular application. Such as certain events, controlled components or complex attributes.

Stretch Goals

  • Computing delta updates after code changes and lets Service Workers update based on that.

More to come...

@necolas necolas added the React Core Team Opened by a member of the React Core Team label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants