You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apollo-Client is significantly slower when running out of a Meteor server environment or a node_modules folder than when it's running inside of a bundle which has had process.env.NODE_ENV preprocessed into a string. This PR fixes it, but seems to have fallen through the cracks. The problem is that in node, process.env is actually a slow API function, not suitable for being called in any sort of inner loop, but apollo-client is using it as though it was fast.
The text was updated successfully, but these errors were encountered:
@jimrandomh You're right about process.env.NODE_ENV being slow in Node, but (unfortunately!) the syntax of the process.env.NODE_ENV === ... checks is important for minifiers to be able to strip out development-only code in production. I don't love that convention, but it's the same convention React uses, so various bundlers and starter codes will already have it configured, which saves Apollo Client from introducing its own additional requirements for proper minification. In Meteor, although the JS minifier does automatically replace process.env.NODE_ENV with a string literal, minification happens only for browser code, which is why process.env.NODE_ENV remains intact.
Apollo-Client is significantly slower when running out of a Meteor server environment or a
node_modules
folder than when it's running inside of a bundle which has hadprocess.env.NODE_ENV
preprocessed into a string. This PR fixes it, but seems to have fallen through the cracks. The problem is that in node,process.env
is actually a slow API function, not suitable for being called in any sort of inner loop, but apollo-client is using it as though it was fast.The text was updated successfully, but these errors were encountered: