Skip to content
Permalink
Browse files

Remove `inlineRequires` to improve Node.js performance (#2614)

Summary:
More details here: https://beautifulcode.1stdibs.com/2018/03/27/rendering-relay-on-the-server/

Tested with the benchmark in this repo: https://github.com/robrichard/relay-benchmark

```
Relay: inlineRequires: true x 616 ops/sec ±2.11% (82 runs sampled)
Relay: inlineRequires: false x 5,249 ops/sec ±6.64% (70 runs sampled)
Fastest is Relay: inlineRequires: false
```
Pull Request resolved: #2614

Reviewed By: kassens

Differential Revision: D13827535

Pulled By: jstejada

fbshipit-source-id: ad598b8d32c069cdd4d652f55bff61dcdf54f063
  • Loading branch information...
robrichard authored and facebook-github-bot committed Jan 28, 2019
1 parent 0c19d5c commit c9c0d35cb76429317420885e3bcf792d362ce8b6
Showing with 1 addition and 3 deletions.
  1. +0 −1 scripts/getBabelOptions.js
  2. +1 −2 scripts/jest/preprocessor.js
@@ -22,7 +22,6 @@ module.exports = function(options) {
const fbjsPreset = require('babel-preset-fbjs/configure')({
autoImport: options.autoImport || false,
objectAssign: false,
inlineRequires: true,
stripDEV: options.env === 'production',
});

@@ -17,8 +17,7 @@ const babel = require('@babel/core');
const createCacheKeyFunction = require('fbjs-scripts/jest/createCacheKeyFunction');
const getBabelOptions = require('../getBabelOptions');
const path = require('path');

const {testSchemaPath} = require('../../dist/relay-test-utils');
const testSchemaPath = require('../../dist/relay-test-utils/lib/RelayTestSchemaPath');

const babelOptions = getBabelOptions({
env: 'test',

0 comments on commit c9c0d35

Please sign in to comment.
You can’t perform that action at this time.