Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid loading files that we know are binary ahead of time #5612

Merged
merged 1 commit into from Feb 19, 2018

Conversation

@mjesun
Copy link
Contributor

mjesun commented Feb 19, 2018

Avoids jest-haste-map reading formats we know they are binary, even when requested to do so via extensions. This fixes a bug in Metro, where, in order to process assets, we need to pass Haste the corresponding extensions, but causes an OOM when opening a ~600 Mb video.

'.ttf',
'.woff',
'.woff2',
].sort());

This comment has been minimized.

Copy link
@cpojer

cpojer Feb 19, 2018

Contributor

why do we need to sort this? This seems like unnecessary overhead to do in every worker. Can you just alt+f5 it upfront?

@cpojer
cpojer approved these changes Feb 19, 2018
Copy link
Contributor

cpojer left a comment

You are making so happy.

@mjesun mjesun force-pushed the mjesun:haste-not-binary branch 2 times, most recently from b003b56 to b9c44e6 Feb 19, 2018
@mjesun mjesun force-pushed the mjesun:haste-not-binary branch from b9c44e6 to 414e63a Feb 19, 2018
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Feb 19, 2018

Codecov Report

Merging #5612 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5612      +/-   ##
==========================================
+ Coverage   60.63%   60.64%   +<.01%     
==========================================
  Files         213      214       +1     
  Lines        7311     7315       +4     
  Branches        3        3              
==========================================
+ Hits         4433     4436       +3     
- Misses       2877     2878       +1     
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-cli/src/search_source.js 45.07% <ø> (ø) ⬆️
packages/jest-haste-map/src/blacklist.js 100% <100%> (ø)
packages/jest-haste-map/src/worker.js 96% <100%> (ø) ⬆️
packages/jest-config/src/normalize.js 93.4% <0%> (ø) ⬆️
.../src/legacy_code_todo_rewrite/jest_adapter_init.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5879c0...414e63a. Read the comment docs.

@mjesun mjesun merged commit bea889c into facebook:master Feb 19, 2018
6 checks passed
6 checks passed
ci/circleci: test-and-deploy-website Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-node-6 Your tests passed on CircleCI!
Details
ci/circleci: test-node-8 Your tests passed on CircleCI!
Details
ci/circleci: test-node-9 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@mjesun mjesun deleted the mjesun:haste-not-binary branch Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.