Skip to content

refactor(metro-file-map): Drop "native find binary" crawler (and forceNodeFilesystemAPI flag)#1693

Closed
kitten wants to merge 2 commits into
facebook:mainfrom
kitten:@kitten/feat/drop-native-find-crawler
Closed

refactor(metro-file-map): Drop "native find binary" crawler (and forceNodeFilesystemAPI flag)#1693
kitten wants to merge 2 commits into
facebook:mainfrom
kitten:@kitten/feat/drop-native-find-crawler

Conversation

@kitten
Copy link
Copy Markdown
Contributor

@kitten kitten commented Apr 22, 2026

Summary

This is a proposal to drop the native find binary crawler code path entirely.

We've recently dropped the native find binary crawler in Expo, which was accidentally activated in some cases. We discovered (which is particularly obvious on large projects/repos and expo/expo itself) that it's consistently much slower than the Node FS crawler.

To get into the "correct" preference and use the Node crawler, we're currently forcing useWatchman: null, which then defaults to use watchman, if it's installed, but falls back to forceNodeFilesystemAPI: true. This is outside of what the types specify as valid, but is the cleanest way to disable the native find binary crawling.

This crawler basically just adds overhead over the Node.js implementation and is consistently slower, and less efficient, while the Node crawler is pretty optimised already (and has very low overhead once #1677 is merged)

The timings of the native find binary crawler in expo/expo was also observed to scale with the size of this repo, compared to a minimal reproduction, so the overhead isn't just limited to the child process call and result parsing.

Changelog: [Internal] Drop native find binary crawler and remove forceNodeFilesystemAPI flag

Test plan

  • Existing tests should pass
  • Quick generated script to play around with and assess the crawlers' comparative performance: kitten@74dffd4

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 22, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 22, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented Apr 22, 2026

@robhogan has imported this pull request. If you are a Meta employee, you can view this in D101985455.

@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 11, 2026

@robhogan merged this pull request in faefcd9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants