Skip to content
Go to file

Latest commit

Finally, a quick and easy perf win!

Some RegExp in the haste map used `.*someText` which has the issue that `.*` matches everything and the engine has to back track if the remaining string doesn't match `someText`.

The `.*` at the beginning or end are not needed since the RegExps don't use `^` or `$` to force that the string is at the beginning or the end. I simply removed it and wow does that make a difference.

Results for building `MarketplaceHome.entrypoint` on my on-demand with `--reset-cache` using a local metro metronome build.

|        | Run 1  | Run 2  | Run 3  |
| Before | 1m 11s | 1m 12s | 1m 12s |
| After  | 1m     | 1m 1s  | 1m 1s  |

Reviewed By: cpojer

Differential Revision: D25180387

fbshipit-source-id: 624635587da2a43c7977761552770800eaa9c667

Git stats


Failed to load latest commit information.


CircleCI Build Status npm version codecov

πŸš‡ The JavaScript bundler for React Native.

  • πŸš… Fast: We aim for sub-second reload cycles, fast startup and quick bundling speeds.
  • βš–οΈ Scalable: Works with thousands of modules in a single application.
  • βš›οΈ Integrated: Supports every React Native project out of the box.

This project was previously part of the react-native repository. In this smaller repository it is easier for the team working on Metro to respond to both issues and pull requests. See react-native#13976 for the initial announcement.

Installation & Documentation

See the Metro website for documentation.


Metro is MIT licensed, as found in the LICENSE file.

You can’t perform that action at this time.