Repository navigation
Description
⚠️ Edit by @lforst: This issue is confirmed. Please see #15100 (comment) for more information on why builds are slow when adding the Sentry SDK, and for temporary workarounds until performance issues are fixed within the SDK.
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nestjs
SDK Version
8.50.0
Framework Version
React 19.0.0, Next 15.1.4, Node 22.9.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
Description
When adding Sentry configuration to next.config.ts using withSentryConfig, I encounter the following warning during the build process:
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (318kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
Is this a known issue? Are there any recommendations for addressing this warning, such as additional configuration options or workarounds?
Thank you!
Steps to Reproduce
-
Start with a minimal
next.config.tsfile:import type { NextConfig } from "next"; const nextConfig: NextConfig = {}; export default nextConfig;
-
Update the file to include Sentry's configuration using
withSentryConfig:import type { NextConfig } from "next"; import { withSentryConfig } from "@sentry/nextjs"; const nextConfig: NextConfig = {}; export default withSentryConfig(nextConfig, { automaticVercelMonitors: true, disableLogger: true, hideSourceMaps: true, org: "MyOrg", project: "javascript-nextjs", reactComponentAnnotation: { enabled: true, }, silent: !process.env.CI, sourcemaps: { deleteSourcemapsAfterUpload: true, disable: process.env.NODE_ENV === "development", }, tunnelRoute: "/monitoring", widenClientFileUpload: true, });
-
Run the build process.
Expected Result
The build completes without warnings or errors.
Actual Result
The following warning appears during the build process:
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (318kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
Activity
andreiborza commentedon Jan 21, 2025
Hello @scobbe, thank you for filing this.
Could you please provide a reproduction repo? I tried setting up a new nextjs project using
npx create-next-app@latestand setting Sentry up usingnpx @sentry/wizard@latest -i nextjsbut did not run into any such warnings.kimdanielarthur-cowlabs commentedon Jan 23, 2025
same issue here with same env , however do not have reproduction repo sadly
141 remaining items
bosswissam commentedon Oct 1, 2025
Also experiencing a slowdown due to sourcemap upload (1min to 5mins). It seems there's three uploads taking place: server, edge and client and some of the hashes repeat. Perhaps there's some unnecessary repetition there?
chargome commentedon Oct 2, 2025
@bosswissam you can give https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/build/#useRunAfterProductionCompileHook a try!
chargome commentedon Nov 18, 2025
If you are facing issues with build time performance we recommend giving Turbopack a try. We moved the uploading logic into the
afterProductionCompilehook and added some additional performance improvements in there too.We did some internal benchmarking (on Vercel) around build-times, sourcemap uploads and bundler configs:
We'll try to find a way together with Vercel for executing an async task after the build completes, so we could upload sourcemaps in there and not block the build anymore. This will unlikely be a short-term solution though as this is not something we can entirely control on our end.
There will be some additional optimizing within Sentry-CLI but within the SDK there is not much left we could improve at this point. We acknowledge that sourcemap upload times can be a bottleneck in your build process, and we understand this can be frustrating, especially in CI/CD pipelines. The most effective way to significantly reduce your build time is to separate the sourcemap upload from your main build process, which is what we'll try to achieve long-term. Currently this is only possible by a custom CI configuration using Sentry CLI.
nimeshmaharjan1 commentedon Nov 19, 2025
idk man our project used to build in 3 mins now it takes 10 mins i have silent: true for local and stuff and still it takes longer time
matheusleo commentedon Nov 27, 2025
@chargome Just to understand better, this issue about the slow build-times has been fixed or the main solution still is the one proposed by @lforst in his comment and the change from webpack to Turbopack as you stated?
eliasfloreteng commentedon Jan 29, 2026
I had a similar problem to this, along with getting an internal Sentry SDK error, and fixed it by not using bun (removing
--bunfrom the build commandbun run --bun build) when building on vercel