Skip to content

perf: reduce CPU and memory overhead of the HTML and CSS pipelines#21332

Merged
alexander-akait merged 14 commits into
mainfrom
perf/html-css-memory
Jul 3, 2026
Merged

perf: reduce CPU and memory overhead of the HTML and CSS pipelines#21332
alexander-akait merged 14 commits into
mainfrom
perf/html-css-memory

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

Profile-driven optimization of the experimental HTML and CSS pipelines (parsers, generators, plugins), in six behavior-preserving commits: fewer allocations on per-token/per-node/per-export hot paths, less retained per-compilation state, and faster tokenizer cores. Measured: HTML AST build −10–15% CPU and ~−50% GC pause, srcset parsing −15%, CSS Modules export-path allocations −40–80%, ~3 MB less heap retained per compilation on a 210-module fixture build.

What kind of change does this PR introduce?

perf

Did you add tests for your changes?

No new tests — the changes are behavior-preserving and covered by the existing css/html unit, integration, and snapshot suites (all green at every commit).

Does this PR introduce a breaking change?

No. CssIcssExportDependency entries serialize per-export locations as four numbers instead of a nested object, which only affects the version-keyed persistent cache layout.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

n/a

Use of AI

Developed with AI assistance (Claude Code): CPU/heap profiling, benchmarking, implementing the optimizations, and running the verification suites; every change was reviewed against profiler evidence and validated by the existing tests.


Generated by Claude Code

Parsers: batch-scan HTML comment bodies, single-slice named-entity
lookup, offset-based (formerly quadratic) srcset tokenizing, one lazy
attribute-map closure per parse; CSS visitors drop per-node lowercase
copies and per-ident slices when no ICSS definitions exist, and the
streaming parser releases its retained source between parses.

Generators/plugins: build one dependency-template context per module
instead of per dependency, memoize the css inheritance chain for a
reference-equal render cache check, skip [webpack/auto] substitution
and re-hashing when HTML content has no placeholder, and avoid the
throwaway exports object + JSON string in CssGenerator.getSize.

Claude-Session: https://claude.ai/code/session_01FSWqLu3mk6zXFtLURntBGJ
Flatten CssIcssExportDependency entry locations to four numbers (the nested
loc objects were the parser's hottest allocation and are retained on the
dependency for the compilation lifetime), read source positions through the
LocConverter cursor instead of allocating A.loc objects, drop the substring
allocation from LocConverter's forward scan, memoize composes
self-reference resolution per parse, avoid lowercased copies of
already-lowercase keywords and at-rule names, and stop scanning incoming
connections in CssGenerator#getTypes once the answer can't change.

Measured on a 210-module CSS + HTML fixture build: retained heap -3MB,
peak heap -5%, sampled parser allocations at the targeted sites -40..80%.
Answer 'is this a known property' through an ASCII-case-folded hash index
over the known-properties table and compare composes/from/global keywords
directly against source ranges, so the common declaration never slices its
property name; the ICSS name slice happens only when @value definitions
exist. Behavior is unchanged, including vendor-prefixed and custom-property
paths, which keep the string-based route.
…location

Line-level profiling of the streaming CSS parser showed skipped component
values still paying a full SoA slot write before being dropped, and every
leaf clearing flag/list slots that only containers read. Skipped leaf
tokens now short-circuit in the two skip-checked consume loops without
building a node, leaf allocation is down to three array writes (containers
clear their own slots), and value/function-arg whitespace joins the
non-CSS-Modules skip set — consumers already tolerate its absence via
nextNonWhitespace-style checks. Non-modules parse of a 3MB stylesheet is
~9% faster; full-AST parses ~5%.
…rsers

CSS: cache the peeked token as a boolean flag instead of an object slot
(saves a GC write barrier per token — the hottest line in the stream),
table-drive the whitespace-run loop, and gate the skip checks behind a
_skipActive flag so no-skip parses pay one boolean test per value.

HTML: replace the name-intern Map with an open-addressed table (one or two
array reads per tag/attribute name), hoist the entity-decode replace
callbacks so decoding allocates no closure, and classify the skip.text scan
through a lookup table instead of per-char comparison chains.

HTML AST build 4-7% faster, entity-heavy documents ~5%, CSS parse ~2%.
Copilot AI review requested due to automatic review settings July 3, 2026 17:34
@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9dc99c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This PR is packaged and the instant preview is available (ae28c54).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@ae28c54
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@ae28c54
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@ae28c54

Comment thread lib/util/LocConverter.js Fixed
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.15670% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.64%. Comparing base (e6fb547) to head (9dc99c0).

Files with missing lines Patch % Lines
lib/html/HtmlGenerator.js 68.42% 6 Missing ⚠️
lib/html/syntax.js 92.77% 6 Missing ⚠️
lib/css/CssParser.js 95.68% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #21332    +/-   ##
========================================
  Coverage   92.64%   92.64%            
========================================
  Files         594      594            
  Lines       65758    65923   +165     
  Branches    18269    18321    +52     
========================================
+ Hits        60921    61075   +154     
- Misses       4837     4848    +11     
Flag Coverage Δ
css-parsing 28.71% <47.18%> (+0.07%) ⬆️
html5lib 28.40% <27.92%> (+0.01%) ⬆️
integration 88.79% <94.58%> (-0.01%) ⬇️
test262 45.40% <7.35%> (-0.08%) ⬇️
unit 43.69% <44.05%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Addresses the code-quality bot: the do/while body always assigns before
the first read.
@codspeed-hq

codspeed-hq Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 27.09%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 3 regressed benchmarks
✅ 140 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory benchmark "asset-modules-source", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 191 KB 513.7 KB -62.81%
Memory benchmark "many-modules-esm", scenario '{"name":"mode-development","mode":"development"}' 1.2 MB 1.9 MB -38.45%
Memory benchmark "wasm-modules-async", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 193.1 KB 244.9 KB -21.15%
Memory benchmark "css-modules", scenario '{"name":"mode-development","mode":"development"}' 1,332.5 KB 850.7 KB +56.64%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing perf/html-css-memory (9dc99c0) with main (e6fb547)

Open in CodSpeed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies profile-driven performance optimizations to webpack’s experimental HTML and CSS pipelines (tokenizers/parsers, generators, and related plugins), primarily targeting reduced allocations, reduced retained compilation state, and faster hot-path scanning.

Changes:

  • Refactors HTML/CSS generators to reuse a single DependencyTemplateContext per module and avoid repeatedly creating per-dependency context state.
  • Optimizes HTML tokenization/entity decoding, srcset parsing, and HTML module post-processing to reduce repeated slicing, closure allocations, and unnecessary hashing.
  • Optimizes CSS parsing/tokenization and CSS Modules rendering paths to reduce per-node/per-token overhead and avoid deep equality checks via memoized structures.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
types.d.ts Updates generated typings to reflect adjusted generator method signatures.
lib/util/LocConverter.js Reworks forward scanning to avoid substring allocations on location computations.
lib/html/syntax.js Adds multiple tokenizer/entity/srcset/name-interning fast paths to reduce allocations and repeated slicing.
lib/html/HtmlParser.js Makes attribute-map decoding lazy and parse-scoped to avoid per-element closure allocation.
lib/html/HtmlModulesPlugin.js Avoids unnecessary placeholder splitting and reuses hashes when content is unchanged.
lib/html/HtmlGenerator.js Lazily loads CSS plugin and reuses a single template context across dependency applications.
lib/dependencies/CssIcssExportDependency.js Flattens per-export location storage (numbers) and materializes loc objects only when needed.
lib/css/syntax.js Optimizes whitespace scanning, token caching, skip handling, and clears retained SoA state after parses.
lib/css/CssParser.js Avoids per-visit slicing/lowercasing where possible; adds memoization for repeated checks.
lib/css/CssModulesPlugin.js Memoizes module inheritance chains to avoid per-render materialization and deep comparisons.
lib/css/CssGenerator.js Reuses a single template context per module and reduces repeated work in type detection.
.changeset/html-css-perf-memory.md Adds a patch changeset entry for the performance improvements.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/util/LocConverter.js Outdated
Comment on lines 34 to 38
const input = this._input;
let i = input.indexOf("\n", this.pos);
if (i === -1 || i >= pos) {
this.column += pos - this.pos;
} else {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in c261a8e. Went with a charCodeAt loop over exactly [this.pos, pos) rather than the suggested backwards lastIndexOf, since a backwards scan from pos is equally unbounded on newline-free input (it would walk to the string start). The loop is strictly delta-bounded, allocation-free, and verified with a 40k-position fuzz against the original algorithm plus a 50k-small-advance run over a newline-free 4 MB source (22 ms, linear).


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Regarding the CodSpeed-flagged asset-modules-inline (dev-rebuild, memory) regression: that fixture contains only JS and asset modules — it never enters lib/css, lib/html, or LocConverter (used only by those parsers), so this diff has no code path into it. The report also notes it compared against 5ce1c22 (no successful run on the true merge base e6fb547, so upstream's HTML AST rewrite is included in the diff) and that runs came from different runtime environments. Meanwhile the css-modules memory benchmark — which this PR does target — improved by 68.6%. I'd treat the flag as noise and acknowledge it in CodSpeed; the re-run on the new head should confirm.


Generated by Claude Code

Copilot AI review requested due to automatic review settings July 3, 2026 17:40
…ypings

Scan exactly [pos, target) with charCodeAt instead of indexOf — a forward
indexOf could run to end-of-input on newline-free minified sources and turn
repeated small advances quadratic (Copilot review). Also update the
CssIcssExportDependency unit test entries to the flattened location fields
(lint job's test typecheck).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Comment thread lib/css/CssGenerator.js Outdated
* @param {InitFragment<GenerateContext>[]} initFragments mutable list of init fragments
* @param {ReplaceSource} source the current replace source which can be modified
* @param {GenerateContext & { cssData: CssData }} generateContext the render context
* @param {DependencyTemplateContext & { cssData: CssData }} templateContext the template context (shared across all dependencies of the module)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right that the contract was missing type — fixed in 32d34bc by widening the inline intersection to DependencyTemplateContext & { cssData: CssData, type: string } (same shape as CssDependencyTemplateContext). Kept the inline form rather than referencing the typedef so the emitted types.d.ts surface stays a local, predictable diff.


Generated by Claude Code

Copilot AI review requested due to automatic review settings July 3, 2026 17:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Comment thread lib/util/LocConverter.js Outdated
Comment on lines +32 to +35
// Advance: scan exactly [this.pos, pos) — no substring allocation,
// and strictly bounded by the delta (an `indexOf`-based scan could
// run to end-of-input on newline-free minified sources and turn
// repeated small advances quadratic).
Comment thread lib/html/HtmlParser.js Outdated
Comment on lines +1060 to +1062
// Lazy decoded-attribute map for the element currently being entered —
// parse-scoped so the hot Element visitor doesn't allocate a closure
// (and memo slot) per element.
Comment thread lib/html/syntax.js Outdated
Comment on lines +1304 to +1306
// Fast-forward over the run of ordinary comment text without
// re-entering the per-state switch; stop on the significant
// code points handled above.
Comment thread lib/html/syntax.js Outdated
Comment on lines +3713 to +3715
// The two `replace` callbacks are hoisted (one per `isAttribute` mode) so a
// decode call doesn't allocate a fresh closure and the callback stays
// monomorphic for the regex engine.
Comment thread lib/css/syntax.js Outdated

/**
* 2-token lookahead: is the next non-whitespace pair `<ident> <colon>` (the prerequisite for consume-a-declaration steps 1 + 3)? Used by `consumeABlocksContents` to skip a declaration attempt that would otherwise call consume-the-remnants-of-a-bad-declaration and be undone by `restoreMark`. A webpack fast-path, not a spec algorithm — so the implementation is free to peek cheaply. It scans raw code points after the cached ident for the next significant one (skipping whitespace + comments) rather than tokenizing them, and never advances the stream: the ident stays cached in `_next` for `consumeADeclaration` to reuse instead of re-tokenizing the property name. Comments skipped here fire `onComment` later, when the chosen consume algorithm tokenizes past them (once, in source order, as before).
* 2-token lookahead: is the next non-whitespace pair `<ident> <colon>` (the prerequisite for consume-a-declaration steps 1 + 3)? Used by `consumeABlocksContents` to skip a declaration attempt that would otherwise call consume-the-remnants-of-a-bad-declaration and be undone by `restoreMark`. A webpack fast-path, not a spec algorithm — so the implementation is free to peek cheaply. It scans raw code points after the cached ident for the next significant one (skipping whitespace + comments) rather than tokenizing them, and never advances the stream: the ident stays cached (`_hasNext`) for `consumeADeclaration` to reuse instead of re-tokenizing the property name. Comments skipped here fire `onComment` later, when the chosen consume algorithm tokenizes past them (once, in source order, as before).
Copilot AI review requested due to automatic review settings July 3, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Comment thread lib/util/LocConverter.js Outdated
Comment on lines +32 to +35
// Advance: scan exactly [this.pos, pos) — no substring allocation,
// and strictly bounded by the delta (an `indexOf`-based scan could
// run to end-of-input on newline-free minified sources and turn
// repeated small advances quadratic).
Comment thread lib/html/HtmlParser.js Outdated
Comment on lines +1060 to +1062
// Lazy decoded-attribute map for the element currently being entered —
// parse-scoped so the hot Element visitor doesn't allocate a closure
// (and memo slot) per element.
Comment thread lib/css/CssModulesPlugin.js Outdated
Comment on lines +136 to +140
/**
* The effective inheritance chain (own layer/supports/media plus inherited
* entries) derives only from module fields fixed at build time, so build the
* array once per module; `renderModule`'s cache check can then compare by
* reference instead of re-materializing and deep-comparing it per render.
Comment thread lib/html/syntax.js Outdated
Comment on lines +7985 to +7987
// (Tracked as a start offset into `input` — `-1` = empty — and sliced
// once per descriptor instead of appended to char-by-char.)
descriptorStart = -1;
Comment thread lib/css/syntax.js Outdated

/**
* 2-token lookahead: is the next non-whitespace pair `<ident> <colon>` (the prerequisite for consume-a-declaration steps 1 + 3)? Used by `consumeABlocksContents` to skip a declaration attempt that would otherwise call consume-the-remnants-of-a-bad-declaration and be undone by `restoreMark`. A webpack fast-path, not a spec algorithm — so the implementation is free to peek cheaply. It scans raw code points after the cached ident for the next significant one (skipping whitespace + comments) rather than tokenizing them, and never advances the stream: the ident stays cached in `_next` for `consumeADeclaration` to reuse instead of re-tokenizing the property name. Comments skipped here fire `onComment` later, when the chosen consume algorithm tokenizes past them (once, in source order, as before).
* 2-token lookahead: is the next non-whitespace pair `<ident> <colon>` (the prerequisite for consume-a-declaration steps 1 + 3)? Used by `consumeABlocksContents` to skip a declaration attempt that would otherwise call consume-the-remnants-of-a-bad-declaration and be undone by `restoreMark`. A webpack fast-path, not a spec algorithm — so the implementation is free to peek cheaply. It scans raw code points after the cached ident for the next significant one (skipping whitespace + comments) rather than tokenizing them, and never advances the stream: the ident stays cached (`_hasNext`) for `consumeADeclaration` to reuse instead of re-tokenizing the property name. Comments skipped here fire `onComment` later, when the chosen consume algorithm tokenizes past them (once, in source order, as before).
Copilot AI review requested due to automatic review settings July 3, 2026 17:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Comment on lines 500 to +504
exportType: /** @type {ExportType} */ (read()),
loc: /** @type {DependencyLocation=} */ (read())
locStartLine: /** @type {number} */ (read()),
locStartColumn: /** @type {number} */ (read()),
locEndLine: /** @type {number} */ (read()),
locEndColumn: /** @type {number} */ (read())

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't occur with webpack's persistent cache: cache.buildDependencies.defaultWebpack defaults to webpack's own lib/ directory (lib/config/defaults.js), so any webpack upgrade fails the build-dependency snapshot and the whole pack is discarded before deserialization — old-format entries are never fed to the new deserialize(). Serialization shapes change between releases under this invariant routinely, so no legacy decode path is needed.


Generated by Claude Code

Comment thread lib/css/syntax.js Outdated
Comment on lines +2553 to +2556
* 2-token lookahead: is the next non-whitespace pair `<ident> <colon>`?
* Fast-path (not a spec algorithm) peeking raw code points without advancing
* the stream — the ident stays cached for `consumeADeclaration`, and skipped
* comments still fire `onComment` later in source order.
Copilot AI review requested due to automatic review settings July 3, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Comment thread lib/css/syntax.js Outdated
Comment on lines +2553 to +2556
* 2-token lookahead: is the next non-whitespace pair `<ident> <colon>`?
* Fast-path (not a spec algorithm) peeking raw code points without advancing
* the stream — the ident stays cached for `consumeADeclaration`, and skipped
* comments still fire `onComment` later in source order.
Comment thread lib/css/CssGenerator.js Outdated
Comment on lines +614 to +616
// `hasCssText` only affects the exports-only / non-link result sets, so
// the common link case can stop scanning connections once js is seen.
// This runs uncached per call via `getReferencedSourceTypes` (#20800).
Comment thread lib/html/syntax.js Outdated
Comment on lines +3201 to +3203
// Slice the candidate run from `input` once; prefixes are taken
// from this short string instead of re-slicing the (potentially
// huge) input per length.
Comment thread lib/css/CssParser.js Outdated
Comment on lines +3591 to +3593
// Property names are analyzed by range — the common declaration
// (unknown property, no composes anchor, no `@value`s) never
// slices its name out of the source.
Copilot AI review requested due to automatic review settings July 3, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Comment thread lib/css/syntax.js Outdated
Comment on lines +1811 to +1813
// Leaves never read the flag / list slots, so those are cleared by
// `_soaAllocContainer` only — leaves dominate, and this keeps their
// allocation at three array writes.
Copilot AI review requested due to automatic review settings July 3, 2026 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 3, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Comment on lines +141 to +156
const moduleInheritanceCache = new WeakMap();

/**
* Gets the memoized inheritance chain of a css module.
* @param {CssModule} module css module
* @returns {Inheritance} inheritance chain including the module's own entry
*/
const getModuleInheritance = (module) => {
let inheritance = moduleInheritanceCache.get(module);
if (inheritance === undefined) {
inheritance = [[module.cssLayer, module.supports, module.media]];
if (module.inheritance) inheritance.push(...module.inheritance);
moduleInheritanceCache.set(module, inheritance);
}
return inheritance;
};

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 9dc99c0. getModuleInheritance now stores the source fields alongside the chain and revalidates all four by reference on each lookup, so a updateCacheModule reassignment invalidates the memo (and the renderModule fast path correctly misses on the new chain object). Verified with the css integration and watch suites.


Generated by Claude Code

updateCacheModule reassigns cssLayer/supports/media/inheritance on the
cached CssModule instance, so an instance-keyed memo could serve a stale
chain on watch rebuilds.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Types Coverage

Coverage after merging perf/html-css-memory into main will be
99.36%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
bin
   webpack.js98.77%100%100%98.77%91
examples
   build-common.js100%100%100%100%
   buildAll.js100%100%100%100%
   examples.js100%100%100%100%
   template-common.js98.21%100%100%98.21%72
examples/custom-javascript-parser
   test.filter.js100%100%100%100%
examples/custom-javascript-parser/internals
   acorn-parse.js100%100%100%100%
   meriyah-parse.js100%100%100%100%
   oxc-parse.js91.30%100%100%91.30%140, 142–143, 145, 147, 153–154, 161, 168, 90
examples/markdown
   webpack.config.mjs100%100%100%100%
examples/module-federation
   test.filter.js100%100%100%100%
examples/reexport-components
   test.filter.js100%100%100%100%
examples/typescript
   test.filter.js100%100%100%100%
examples/typescript-non-erasable
   test.filter.js50%100%100%50%5
examples/virtual-modules
   test.filter.js100%100%100%100%
examples/wasm-bindgen-esm
   test.filter.js100%100%100%100%
examples/wasm-complex
   test.filter.js100%100%100%100%
examples/wasm-emscripten
   test.filter.js100%100%100%100%
examples/wasm-simple
   test.filter.js100%100%100%100%
examples/wasm-simple-source-phase
   test.filter.js100%100%100%100%
lib
   APIPlugin.js100%100%100%100%
   AsyncDependenciesBlock.js100%100%100%100%
   AutomaticPrefetchPlugin.js100%100%100%100%
   BannerPlugin.js100%100%100%100%
   Cache.js98.21%100%100%98.21%101
   CacheFacade.js100%100%100%100%
   Chunk.js99.72%100%100%99.72%39
   ChunkGraph.js100%100%100%100%
   ChunkGroup.js100%100%100%100%
   ChunkTemplate.js100%100%100%100%
   CircularModulesPlugin.js98.81%100%100%98.81%136
   CleanPlugin.js99.12%100%100%99.12%207, 227
   CodeGenerationResults.js100%100%100%100%
   CompatibilityPlugin.js100%100%100%100%
   Compilation.js98.43%100%100%98.43%1641, 1960, 1967, 1975, 1997, 2000, 2939, 3418–3419, 3451, 4117, 4147, 4200–4201, 4205, 4210, 4226–4227, 4241–4242, 4247–4248, 4725, 4751, 526, 531, 5559, 5591, 5608, 5624, 5640, 5655, 5680–5681, 5683, 6011, 6016, 6022, 6025, 6037, 6039, 6043, 6059, 6074, 6106, 6160, 6184, 6298, 777–778
   Compiler.js99.56%100%100%99.56%1147–1148, 1156
   ConcatenationScope.js98.65%100%100%98.65%195
   ConditionalInitFragment.js100%100%100%100%
   ConstPlugin.js100%100%100%100%
   ContextExclusionPlugin.js100%100%100%100%
   ContextModule.js100%100%100%100%
   ContextModuleFactory.js97.40%100%100%97.40%258, 395, 418, 420, 424, 433–434
   ContextReplacementPlugin.js100%100%100%100%
   DefinePlugin.js98.99%100%100%98.99%172–173, 189, 208, 282
   DependenciesBlock.js100%100%100%100%
   Dependency.js98.51%100%100%98.51%479, 525
   DependencyTemplate.js100%100%100%100%
   DependencyTemplates.js100%100%100%100%
   DotenvPlugin.js98.41%100%100%98.41%378, 391–392
   DynamicEntryPlugin.js100%100%100%100%
   EntryOptionPlugin.js100%100%100%100%
   EntryPlugin.js100%100%100%100%
   Entrypoint.js100%100%100%100%
   EnvironmentPlugin.js97.14%100%100%97.14%49
   ErrorHelpers.js100%100%100%100%
   EvalDevToolModulePlugin.js100%100%100%100%
   EvalSourceMapDevToolPlugin.js100%100%100%100%
   ExportsInfo.js100%100%100%100%
   ExportsInfoApiPlugin.js100%100%100%100%
   ExternalModule.js98.55%100%100%98.55%1100, 1103, 502–506, 508, 654
   ExternalModuleFactoryPlugin.js100%100%100%100%
   ExternalsPlugin.js100%100%100%100%
   FileSystemInfo.js99.52%100%100%99.52%182, 2382–2383, 2386, 2397, 2408, 2419, 280, 3823, 3838, 3862
   FlagAllModulesAsUsedPlugin.js100%100%100%100%
   FlagDependencyExportsPlugin.js98.42%100%100%98.42%413, 422, 424, 428
   FlagDependencyUsagePlugin.js100%100%100%100%
   FlagEntryExportAsUsedPlugin.js100%100%100%100%
   Generator.js100%100%100%100%
   HotModuleReplacementPlugin.js100%100%100%100%
   HotUpdateChunk.js100%100%100%100%
   IgnorePlugin.js100%100%100%100%
   IgnoreWarningsPlugin.js100%100%100%100%
   InitFragment.js100%100%100%100%
   JavascriptMetaInfoPlugin.js100%100%100%100%
   LazyBarrel.js100%100%100%100%
   LibraryTemplatePlugin.js100%100%100%100%
   LoaderOptionsPlugin.js100%100%100%100%
   LoaderTargetPlugin.js100%100%100%100%
   MainTemplate.js100%100%100%100%
   ManifestPlugin.js100%100%100%100%
   Module.js98.50%100%100%98.50%1285, 1290, 1350, 1364, 1426, 1435
   ModuleFactory.js100%100%100%100%
   ModuleFilenameHelpers.js98.85%100%100%98.85%106, 108
   ModuleGraph.js99.73%100%100%99.73%1005
   ModuleGraphConnection.js100%100%100%100%
   ModuleInfoHeaderPlugin.js100%100%100%100%
   ModuleNotFoundError.js100%100%100%100%
   ModuleProfile.js100%100%100%100%
   ModuleSourceTypeConstants.js100%100%100%100%
   ModuleTemplate.js100%100%100%100%
   ModuleTypeConstants.js100%100%100%100%
   MultiCompiler.js99.69%100%100%99.69%661
   MultiStats.js100%100%100%100%
   MultiWatching.js100%100%100%100%
   NoEmitOnErrorsPlugin.js100%100%100%100%
   NodeStuffPlugin.js100%100%100%100%
   NormalModule.js97.89%100%100%97.89%1223, 1226, 1243, 1260, 1507, 1541, 1557, 1644, 2000, 2299, 2304–2314, 415, 419, 573
   NormalModuleFactory.js99.47%100%100%99.47%1083, 1392, 486, 498
   NormalModuleReplacementPlugin.js100%100%100%100%
   NullFactory.js100%100%100%100%
   OptimizationStages.js100%100%100%100%
   OptionsApply.js100%100%100%100%
   Parser.js100%100%100%100%
   PlatformPlugin.js100%100%100%100%
   PrefetchPlugin.js100%100%100%100%
   ProgressPlugin.js98.85%100%100%98.85%527–528, 533, 535, 599
   ProvidePlugin.js100%100%100%100%
   RawModule.js100%100%100%100%
   RecordIdsPlugin.js100%100%100%100%
   RequestShortener.js100%100%100%100%
   ResolverFactory.js100%100%100%100%
   RuntimeGlobals.js100%100%100%100%
   RuntimeModule.js100%100%100%100%
   RuntimePlugin.js100%100%100%100%
   RuntimeTemplate.js100%100%100%100%
   SelfModuleFactory.js100%100%100%100%
   SingleEntryPlugin.js100%100%100%100%
   SourceMapDevToolModuleOptionsPlugin.js100%100%100%100%
   SourceMapDevToolPlugin.js98.62%100%100%98.62%220, 224, 226, 419, 430, 889
   Stats.js100%100%100%100%
   Template.js100%100%100%100%
   TemplatedPathPlugin.js99.43%100%100%99.43%308–309
   UseStrictPlugin.js100%100%100%100%
   WarnCaseSensitiveModulesPlugin.js100%100%100%100%
   WarnDeprecatedOptionPlugin.js100%100%100%100%
   WarnNoModeSetPlugin.js100%100%100%100%
   WatchIgnorePlugin.js100%100%100%100%
   Watching.js100%100%100%100%
   WebpackError.js100%100%100%100%
   WebpackIsIncludedPlugin.js100%100%100%100%
   WebpackOptionsApply.js100%100%100%100%
   WebpackOptionsDefaulter.js100%100%100%100%
   buildChunkGraph.js99.87%100%100%99.87%371
   cli.js98.63%100%100%98.63%10, 119, 549, 581, 631, 905
   index.js99.72%100%100%99.72%184
   validateSchema.js94.67%100%100%94.67%100, 87, 89, 98
   webpack.js96.33%100%100%96.33%10, 198, 220, 222
lib/asset
   AssetBytesGenerator.js100%100%100%100%
   AssetBytesParser.js100%100%100%100%
   AssetGenerator.js100%100%100%100%
   AssetModule.js100%100%100%100%
   AssetModulesPlugin.js97.33%100%100%97.33%282, 306, 309, 36, 362, 41
   AssetParser.js100%100%100%100%
   AssetSourceGenerator.js100%100%100%100%
   AssetSourceParser.js100%100%100%100%
   RawDataUrlModule.js100%100%100%100%
lib/async-modules
   AsyncModuleHelpers.js100%100%100%100%
   AwaitDependenciesInitFragment.js100%100%100%100%
   InferAsyncModulesPlugin.js100%100%100%100%
lib/bun
   BunTargetPlugin.js100%100%100%100%
lib/cache
   AddBuildDependenciesPlugin.js100%100%100%100%
   AddManagedPathsPlugin.js100%100%100%100%
   IdleFileCachePlugin.js97.92%100%100%97.92%75, 87, 95
   MemoryCachePlugin.js95.83%100%100%95.83%33
   MemoryWithGcCachePlugin.js93.15%100%100%93.15%107, 114–115, 123, 90
   PackFileCacheStrategy.js96.40%100%100%96.40%1251, 1351, 1355, 1417, 628, 647, 657–659, 661, 677–678, 683, 686, 688, 693, 698, 723, 729, 763, 769, 775, 780, 791, 800, 805–806, 808, 825, 831–832, 834
   ResolverCachePlugin.js100%100%100%100%
   getLazyHashedEtag.js100%100%100%100%
   mergeEtags.js100%100%100%100%
lib/config
   browserslistTargetHandler.js100%100%100%100%
   defaults.js99.33%100%100%99.33%1468–1470, 1478, 274,

@alexander-akait alexander-akait merged commit ae28c54 into main Jul 3, 2026
104 of 105 checks passed
@alexander-akait alexander-akait deleted the perf/html-css-memory branch July 3, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants