Skip to content

Add an "Optimization" recipe #1783

Closed
Closed
@markerikson

Description

@markerikson

Per discussion in #1751 , it's time we added a recipes page to cover performance and optimization. @JAndritsch has volunteered to help write it, and I can definitely provide feedback and assistance.

Initial potential set of topics to cover per that discussion:

  1. Connect components to state at the lowest level possible to prevent cascading renders from parent to children.
  2. Normalize your data and pass collections of IDs instead of collections of large objects to components.
  3. Use ImmutableJS.
  4. Take advantage of "initialProps".
  5. Re-define shouldComponentUpdate() when necessary.
  6. Use React.addons.Perf to find and eliminate wasted renders.
  7. Use Chrome's built-in profiling tools.
  8. Memoization with Reselect
  9. Per-instance component memoization
  10. Performance in general. That subscriptions are O(n), that React Redux shallowly compares props, that memoization helps us avoid recalculations, etc.

Link-dumping a bunch of potential references, docs, and discussions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions