refactor(metro-file-map): Drop "native find binary" crawler (and `forceNodeFilesystemAPI` flag) (#1693)
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 https://github.com/facebook/metro/issues/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 Pull Request resolved: https://github.com/facebook/metro/pull/1693 Test Plan: - Existing tests should pass - Quick generated script to play around with and assess the crawlers' comparative performance: https://github.com/kitten/metro/commit/74dffd41a49058cbc32a532816f213fcd2bbe4d4 Reviewed By: huntie Differential Revision: D101985455 Pulled By: robhogan fbshipit-source-id: efe2ab02fc5c0edac4d68f037db57c635fef8e50
P
Phil Pluckthun committed
faefcd98705ab59bd8fab0d01734d15a819fbf63
Parent: 0e9d7aa
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 5/11/2026, 5:37:10 PM