{"record":{"id":"f46940a2ad727afc","repo":"gatsbyjs/gatsby","slug":"react-profiling-is-enabled-this-can-have-a-perfor","errorCode":null,"errorMessage":"React Profiling is enabled. This can have a performance impact. See https://www.gatsbyjs.com/docs/profiling-site-performance-with-react-profiler/#performance-impact","messagePattern":"React Profiling is enabled\\. This can have a performance impact\\. See https://www\\.gatsbyjs\\.com/docs/profiling-site-performance-with-react-profiler/#performance-impact","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/commands/build.ts","lineNumber":90,"sourceCode":"module.exports = async function build(\n  program: IBuildArgs,\n  // Let external systems running Gatsby to inject attributes\n  externalTelemetryAttributes: Record<string, any>\n): Promise<void> {\n  // global gatsby object to use without store\n  global.__GATSBY = {\n    buildId: uuid.v4(),\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    root: program!.directory,\n  }\n\n  if (isTruthy(process.env.VERBOSE)) {\n    program.verbose = true\n  }\n  report.setVerbose(program.verbose)\n\n  if (program.profile) {\n    report.warn(\n      `React Profiling is enabled. This can have a performance impact. See https://www.gatsbyjs.com/docs/profiling-site-performance-with-react-profiler/#performance-impact`\n    )\n  }\n\n  report.verbose(`Running build in \"${process.env.NODE_ENV}\" environment`)\n\n  await updateInternalSiteMetadata({\n    name: program.sitePackageJson.name,\n    sitePath: program.directory,\n    lastRun: Date.now(),\n    pid: process.pid,\n  })\n\n  markWebpackStatusAsPending()\n\n  const publicDir = path.join(program.directory, `public`)\n  if (!externalTelemetryAttributes) {\n    await initTracer(","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/commands/build.ts#L72-L108","documentation":"Build-time notice in the build command when --profile (React Profiler) is passed. Profiling instruments React renders, which slows the build and the site, so Gatsby warns up front and links to docs describing the performance impact.","triggerScenarios":"Thrown at packages/gatsby/src/commands/build.ts:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only pass --profile when actually diagnosing render performance","Remove --profile from production build scripts/CI","Profile locally against representative data instead of in deployed builds"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}