Commit faefcd9
refactor(metro-file-map): Drop "native find binary" crawler (and
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
Pull Request resolved: #1693
Test Plan:
- Existing tests should pass
- Quick generated script to play around with and assess the crawlers' comparative performance: kitten@74dffd4
Reviewed By: huntie
Differential Revision: D101985455
Pulled By: robhogan
fbshipit-source-id: efe2ab02fc5c0edac4d68f037db57c635fef8e50forceNodeFilesystemAPI flag) (#1693)1 parent 0e9d7aa commit faefcd9
16 files changed
Lines changed: 28 additions & 374 deletions
File tree
- packages
- metro-file-map
- src
- cache/__tests__
- crawlers
- __tests__
- node
- watchman/__tests__
- lib
- __tests__
- types
- crawlers/node
- metro/src/node-haste/DependencyGraph
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
134 | | - | |
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
Lines changed: 0 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 40 | | |
48 | | - | |
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
| |||
140 | 132 | | |
141 | 133 | | |
142 | 134 | | |
143 | | - | |
144 | 135 | | |
145 | 136 | | |
146 | 137 | | |
| |||
Lines changed: 14 additions & 184 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 15 | | |
42 | 16 | | |
43 | 17 | | |
| |||
126 | 100 | | |
127 | 101 | | |
128 | 102 | | |
129 | | - | |
130 | | - | |
131 | 103 | | |
132 | | - | |
133 | 104 | | |
134 | 105 | | |
135 | 106 | | |
136 | 107 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | 108 | | |
196 | 109 | | |
197 | 110 | | |
198 | 111 | | |
199 | 112 | | |
200 | | - | |
201 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
202 | 116 | | |
203 | | - | |
204 | | - | |
| 117 | + | |
| 118 | + | |
205 | 119 | | |
206 | 120 | | |
207 | 121 | | |
| 122 | + | |
208 | 123 | | |
209 | 124 | | |
210 | 125 | | |
211 | 126 | | |
212 | 127 | | |
213 | 128 | | |
214 | 129 | | |
215 | | - | |
| 130 | + | |
216 | 131 | | |
217 | 132 | | |
218 | | - | |
| 133 | + | |
219 | 134 | | |
220 | 135 | | |
221 | 136 | | |
| |||
225 | 140 | | |
226 | 141 | | |
227 | 142 | | |
228 | | - | |
229 | | - | |
| 143 | + | |
| 144 | + | |
230 | 145 | | |
231 | 146 | | |
232 | | - | |
| 147 | + | |
233 | 148 | | |
234 | 149 | | |
235 | 150 | | |
236 | 151 | | |
| 152 | + | |
237 | 153 | | |
238 | 154 | | |
239 | 155 | | |
240 | 156 | | |
241 | 157 | | |
242 | 158 | | |
243 | 159 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 160 | + | |
250 | 161 | | |
251 | 162 | | |
252 | 163 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | 164 | | |
332 | 165 | | |
333 | 166 | | |
334 | 167 | | |
335 | 168 | | |
336 | 169 | | |
337 | 170 | | |
338 | | - | |
339 | 171 | | |
340 | 172 | | |
341 | 173 | | |
| |||
357 | 189 | | |
358 | 190 | | |
359 | 191 | | |
360 | | - | |
361 | 192 | | |
362 | 193 | | |
363 | 194 | | |
| |||
378 | 209 | | |
379 | 210 | | |
380 | 211 | | |
381 | | - | |
382 | 212 | | |
383 | 213 | | |
384 | 214 | | |
| |||
440 | 270 | | |
441 | 271 | | |
442 | 272 | | |
443 | | - | |
| 273 | + | |
444 | 274 | | |
445 | 275 | | |
446 | 276 | | |
| |||
Lines changed: 0 additions & 41 deletions
This file was deleted.
0 commit comments