Skip to content

Commit c9c0d35

Browse files
robrichardfacebook-github-bot
authored andcommitted
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
1 parent 0c19d5c commit c9c0d35

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

‎scripts/getBabelOptions.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module.exports = function(options) {
2222
const fbjsPreset = require('babel-preset-fbjs/configure')({
2323
autoImport: options.autoImport || false,
2424
objectAssign: false,
25-
inlineRequires: true,
2625
stripDEV: options.env === 'production',
2726
});
2827

‎scripts/jest/preprocessor.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ const babel = require('@babel/core');
1717
const createCacheKeyFunction = require('fbjs-scripts/jest/createCacheKeyFunction');
1818
const getBabelOptions = require('../getBabelOptions');
1919
const path = require('path');
20-
21-
const {testSchemaPath} = require('../../dist/relay-test-utils');
20+
const testSchemaPath = require('../../dist/relay-test-utils/lib/RelayTestSchemaPath');
2221

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

0 commit comments

Comments
 (0)