From 54a538f521d0fbc95b5c4c23200810be488317bb Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Mon, 23 Mar 2020 15:28:36 -0400 Subject: [PATCH] fix(@angular-devkit/build-angular): reduce fast sourcemap threshold High fidelity sourcemap processing can be expensive for larger bundle sizes. This reduces the threshold to the original 500KB value to improve performance. (cherry picked from commit d2dce463d0c7b1cb72e8acd8a0d23a318facfa90) --- .../angular_devkit/build_angular/src/utils/process-bundle.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts index 6c0867869e47..58e3b7ce7686 100644 --- a/packages/angular_devkit/build_angular/src/utils/process-bundle.ts +++ b/packages/angular_devkit/build_angular/src/utils/process-bundle.ts @@ -29,8 +29,8 @@ import { I18nOptions } from './i18n-options'; const cacache = require('cacache'); const deserialize = ((v8 as unknown) as { deserialize(buffer: Buffer): unknown }).deserialize; -// If code size is larger than 1MB, consider lower fidelity but faster sourcemap merge -const FAST_SOURCEMAP_THRESHOLD = 1024 * 1024; +// If code size is larger than 500KB, consider lower fidelity but faster sourcemap merge +const FAST_SOURCEMAP_THRESHOLD = 500 * 1024; export interface ProcessBundleOptions { filename: string;