GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Typescriptify the sources by e-cloud · Pull Request #5 · webpack/webpack-sources Conversation
|
Current coverage is 58.94% (diff: 100%)@@ master #5 diff @@
==========================================
Files 11 11
Lines 397 397
Methods 75 75
Messages 0 0
Branches 59 59
==========================================
Hits 234 234
Misses 163 163
Partials 0 0
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Addresses the polish items from the second review of PR #221: - **#2 post-minifier asset shape benchmark.** New Scenario 3 in `benchmark/memory/clear-cache.mjs` constructs the shape webpack assets actually present at the PROCESS_ASSETS_STAGE_DEV_TOOLING hook: a `CachedSource` wrapping a `SourceMapSource` whose `_cachedSource` (bundle string) and `_cachedMaps[{}]` (composed map) are populated. 50 chunks: 8.5 MB baseline → 0 MB after `clearCache({ maps: true, source: false, recursive: false })`. - **#3 optional `parsedMap: true` flag** on `ClearCacheOptions`. When set, `SourceMapSource.clearCache` drops the parsed object forms of `_sourceMapAsObject` and `_innerSourceMapAsObject` (heaviest cached representation), but only when a serialized form (buffer or string) is also held so data stays recoverable. Defaults to `false` to preserve the cheap toString re-hydration path described in the comment. - **#4 `getCachedData()` after `clearCache()` interaction test.** Pins the observable shape: buffer + source = undefined, maps empty, hash + size preserved when their flags default to false. Round-trips through `new CachedSource(source, data)` to confirm cleared cached data is still a valid input. - **#5 "release hint" framing** in the `Source.prototype.clearCache` JSDoc. Opens with "clearCache is a memory hint: it never affects correctness or output, only how expensive the next read is." - **#6 dedup correctness test** already lives at `test/clearCache.js:251` ("a shared subtree is walked once when a `visited` WeakSet is passed") with a negative control at :269. Tests grow to 25 (was 22). Full suite 89,870/89,870 pass, lint clean. Benchmark numbers unchanged on Scenarios 1 + 2: 44.7% heap reduction on unique tasks, 3.6× dedup speedup, 228× `recursive: false` speedup. https://claude.ai/code/session_01LLtSGKaynui1P1wQsfVnXx
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.