Repository navigation
Share transform results between graphs - #2239
Conversation
Currently, every graph gets its own freshly deserialised copy of each module's transform output from `cacheStores`. That's fine with one graph per platform, but lazy bundling serves each `import()` target as a graph of its own, and that graph holds its entire transitive closure - for a lazy route, most of the app. So dev server memory grows with every lazy chunk a session touches, and each new chunk reads its whole closure back out of the cache, which is why lazy requests get slower as well as heavier. This PR shares one in-memory copy of each module's `output` and `dependencies` between all graphs with equal transform options. ## Impact - **Expo web app with async routes** (boardsesh, 392 route chunks): the dev server fits in 1.4GB with sharing. Without it, the same session ran a 24GB machine out of memory. - **The same app as it ships today** (82 lazy chunks): -61% dev server heap (512MB -> 202MB), and chunk requests ~6x faster (median 56ms -> 9ms). - **Mattermost with 20 screens loaded lazily**: -88% heap held by graphs (2.2GB -> 263MB), and chunk requests ~2.4x faster. The cost is per lazy graph, and it's predictable. Without sharing, each chunk's graph takes about 2.5x its dev bundle size in heap, and sharing removes ~95% of that: | Lazy chunk | Dev bundle | `main` | This PR | |---|---|---|---| | Trivial RN screen (only renders a `View`) | 4.9MB | 12.3MB | 0.8MB | | Library behind `import()`, no RN | 143KB (median) | 4.4MB | 0.55MB | | Expo Router route (boardsesh) | 21MB (median) | ~55MB (estimated from the ratio) | 3.6MB | | Large screen (Mattermost) | ~40MB | 102MB | 5.3MB | Even a trivial screen holds its own copy of React Native and the renderer, so every RN route saves at least ~11MB per platform, and apps with many RN routes save the most. iOS and Android graphs don't share with each other, so that's per route, per platform. This is also the real explanation for #1191 and #1355, which we closed as lazy bundling compounding memory use under parallel requests. It's the number of lazy graphs that matters, not concurrency, and #1355's "long loading each import" is the same cost showing up as time. ## This change `Transformer` keeps the latest transform result for each module (file plus transform options) in memory, checked before `cacheStores`. - **No invalidation of its own.** Entries use the same content-addressed key as the cache stores, so they can only be stale where a store hit would be. Sharing is skipped when `cacheStores` is empty, since that disables caching. - **Managed explicitly, not by the GC.** An edit replaces the module's entry. When a graph update releases modules, or a graph ends, `DeltaBundler` looks up just the released paths in the live graphs, and `Transformer` drops the entries no graph holds any more. That's one lookup per released path per graph - an edit that releases a module from each of 392 graphs costs ~6ms in total - and an entry dropped early only costs a cache store read. - **Concurrent requests share one read.** Requests for a key that's already in flight share its cache read or worker transform. `getSource` is now created outside `transformFile`. Defined inline, it shared a closure context with the new lookup and kept every file's contents alive (+70MB on Mattermost). ## Why an opt-out flag This is non-breaking for consumers that respect Metro's types. `Module.output` and `TransformResultDependency` are already read-only, Metro never writes to them (the full suite passes with outputs frozen), and every bundle in the benchmarks below is byte-identical with sharing on. Shared objects aren't frozen or copied though, so code that writes to them anyway will now affect every graph holding the same module. Expo is the one consumer we know of that does, so `@expo/metro-config` will need to opt out in the short term. Our production tree shaking edits module data in place: `reconcileTransformSerializerPlugin` replaces output items with their final transform, and `treeShakeSerializerPlugin` decrements `imports` on dependency data. Both only run under `optimize` / `usedExports`, ie in `expo export`, but an export builds several graphs with equal transform options in one server (eg one per DOM component), so with sharing each graph's tree shaking would leak into the others. Once those passes copy before writing, we can drop the opt-out. Expo's dev env var serializer and packed source map patch also write to outputs, but idempotently, so they're safe to share - the boardsesh bundles below are byte-identical through Expo's serializers. So the option is on by default, with `transformer.unstable_shareTransformResults: false` to opt out. It's stripped before the transformer config is hashed, so it doesn't change any cache keys. ## Benchmark AI-driven. Heap is `heapUsed` after two forced GCs, measured in the server process. ### Mattermost RN 0.83.9, iOS dev server with watch off, the main bundle and then 20 screens as split-bundle requests, warm `FileStore`. Three interleaved runs per mode, heap figures identical across runs. | | `main` | This PR | |---|---|---| | Heap held by graphs | 2,201MB | 263MB (-88%) | | Heap per chunk graph | 102.4MB | 5.3MB (-95%) | | Median chunk request | 331ms | 139ms (~2.4x faster) | | Main bundle request | no measurable difference | | | Heap after ending every graph | 159.7MB | 159.8MB | | Edit round, all 21 graphs updated (watch mode) | ~2.0s | ~1.6s | | Bundles | | byte-identical | ### boardsesh (Expo web) Expo SDK 58, RN 0.88.1, Expo Router, served by Expo CLI with the app's own `metro.config.js`. The main bundle and then every lazy chunk URL it names. One run per mode, so the times are indicative. | | `main` | This PR | |---|---|---| | As shipped (82 chunks): dev server heap | 512MB | 202MB (-61%) | | As shipped: heap in chunk graphs | 359MB | 45MB (-87%) | | As shipped: median / total chunk request | 56ms / 6.5s | 9ms / 2.7s | | Async routes (392 chunks): dev server heap | out of memory on a 24GB machine | 1,427MB | | Bundles | | byte-identical | ## Changelog ``` - **[Experimental]**: Share module outputs between graphs with equal transform options, on by default behind `transformer.unstable_shareTransformResults`. This cuts dev server memory by ~60-90% in apps with lazy bundles, and makes lazy chunk requests several times faster. Code that writes to module outputs or dependency data, which the types already forbid, can now affect other graphs ``` ## Test plan New unit tests, plus an integration test that builds real graphs with sharing on and off, checks which outputs they share, and checks that ending the last graph holding a module drops its entry. Mattermost: this PR's files compiled into the app's Metro 0.88.0. Besides the runs above, 10 rounds of watch-mode edits to a module every graph holds, half of them adding or removing an import, then requesting all 21 bundles: every bundle byte-identical to `main`, with shared entries flat at ~7,320 and heap flat. boardsesh at boardsesh/boardsesh@544f0bb, with this PR backported to Metro 0.87.1 (Expo SDK 58's pin), dropping only 0.88-only code. Expo CLI 58 leaves `asyncRoutes` out of the dev web HTML's bundle URL, so with `web.output: 'single'` the app's async routes only apply in `expo export`. The async routes rows add `transform.asyncRoutes=true` by hand. Not yet tested: HMR to a real client, cold start with parallel chunk requests, Windows.
76e401e to
c2a9742
Compare
Metro review: Looks goodRisk: medium · Commit: Graphs with equal transform options now share one in-memory copy of each module's transform output and dependencies. Entries are keyed by the transform cache key and dropped when no live graph holds them any more. Since my last review, released virtual-module paths are mapped to the source paths they were transformed as, so their shared entries are now dropped. A new integration test fails without that change. Tests, typecheck, lint and API snapshots all pass, and I found nothing new that needs changing. No findings. Verified
Not run: I didn't benchmark head against base. I wrote a script for it (bench/gen.js, run.js, bench.sh: 20 lazy-route graphs over a generated 1,500-module core, warm FileStore, base and head alternated), but the sandbox's permission check denied running it and this session can't approve it. The memory and time claims are backed by a maintainer's interleaved runs in the discussion, and the code changed since my last review only remaps the released paths. I didn't check Windows behavior, since no Windows machine was available. HMR to a real client is also untested. Automated review by Claude. Advisory only: it never approves or blocks, and a maintainer makes the call. |
|
Measured with the
Δ memory: heap the chunk graphs add to the dev server. Δ time: all chunk requests, one at a time. Bundles byte-identical in every run. The server's heap after the main bundle is 6–8 MB higher with this PR (consistent across runs). Cold builds (
At 5 runs, |t| < 2.3 is not significant (p > 0.05). Bundles byte-identical in every run. |
|
Review notes. None of these are correctness bugs in Metro.
The bot review lists 3 and 4 as memory-only; this is the detail behind them. |
|
Just a heads up that I'm making a change here so that this isn't turned off by Claude regarded this as a kind of cache that should be disabled if That also addresses @vzaidman's point 1. |
Fixed now that transform sharing doesn't depend on non-empty
I like this in principle but I'm just not sure we've got anywhere to put it - it's something like a Metro strict mode (env var?). I'm not sure it's worth adding just for this - Flow/TypeScript already prevents mutating the transform result so I think anyone who's doing it knows they're breaking the rules (ahem, Expo).
True. I've updated the docblock to be clearer about this. The more surgical fix is for
Good catch, updated the docblock. |
| transformVariants: {readonly [name: string]: Partial<ExtraTransformOptions>}, | ||
| publicPath: string, | ||
| // Share one in-memory copy of each transform result between graphs with | ||
| // equal transform options. Off when `cacheStores` is empty. Experimental. |
There was a problem hiding this comment.
nit · Config type comment still says sharing is off when cacheStores is empty
Commit 9927748 made sharing independent of cacheStores: sharesTransformResults now returns only config.transformer.unstable_shareTransformResults, and there's a new Transformer test for sharing with cacheStores: []. The comment on unstable_shareTransformResults in TransformerConfigT still says "Off when cacheStores is empty". Anyone who reads it and sets cacheStores: [] to turn sharing off would still get sharing. Suggest removing that sentence, which would also match docs/Configuration.md.
Evidence: grep cacheStores on the head: types.js:170 is the only remaining reference to the old gating. Transformer.js sharesTransformResults doesn't read cacheStores, and the test 'with transformer.unstable_shareTransformResults and empty cacheStores, transforms once and shares the result' passes. · id a3f0bb8e
Publish Metro 0.88.1 from `main`. Nothing since 0.88.0 is breaking, so this is a patch release, but one new default is worth reading about before upgrading: transform results are now shared between graphs (see below). Changelog: Internal ## Draft release notes ``` - **[Feature]**: metro-cache: `HttpStore` accepts `maxSockets`, to change its connection limit, and `getParams`, to add query parameters (such as a short-lived credential) to every request (#2246 by @GijsWeterings) - **[Feature]**: `Transforming file` end log entries report the worker's CPU time for the transform as `cpu_time_us` (#2282 by @vzaidman) - **[Fix]**: Keep function bindings that are reassigned when folding constants in production builds (#2197 by @Mwrnk) - **[Fix]**: Keep side effects such as `i++` in the leading operands of a sequence when folding constants in production builds (#2278 by @burrows99) - **[Fix]**: Keep a `var` declared in a branch that's removed when folding constants in production builds, if code outside the branch uses it, instead of throwing a `ReferenceError` (#2279 by @burrows99) - **[Fix]**: Don't replace `void 0` with `undefined` when folding constants in production builds, where `undefined` is shadowed (#2215 by @ZainnQureshii) - **[Fix]**: Memoized inline requires: A module first referenced in a skipped optional chain, logical assignment or default value is no longer `undefined` at later references (#2280 by @burrows99) - **[Fix]**: `experimentalImportSupport`: `export * from` a module with an enumerable `__esModule` no longer throws in strict mode (#2281 by @burrows99) - **[Fix]**: Define a `__proto__` key in JSON modules as an own property, matching `JSON.parse` (#2199 by @Mwrnk) - **[Fix]**: `FileStore` writes cache entries atomically, so concurrent reads no longer miss valid entries or see partial writes (#2040 by @frankleng) - **[Fix]**: Respect `excludeSource` in inline source maps, and pass it to `serializer.customSerializer` (#2256 by @robhogan) - **[Fix]**: Stop leaking a graph's `DeltaCalculator` and file change listener when its first build fails (#2283 by @sensei-woo) - **[Fix]**: Resolve a package subpath ending in `/.`, such as `pkg/.`, instead of throwing `Unexpectedly escaped traversal` (#2213 by @kwy404) - **[Fix]**: Fix `resolver.blockList: []` hiding every file (8f49d3681cfd) - **[Fix]**: Fix an out-of-memory crash on a symlink into itself (#2204 by @robhogan) - **[Fix]**: Fix the path of a file added through a symlink to the project root (#2212 by @robhogan) - **[Fix]**: Fix `Failed to collapse` on a path through a symlink out of the project root, into a directory whose name ends in `.` (#2237 by @robhogan) - **[Fix]**: `require.context` on a directory above the project root follows symlinks inside the project root, and lists each level correctly from two or more levels up (#2229 by @robhogan) - **[Fix]**: Use a separate file map cache under Bun, which can't read Node's cache (#2209 by @robhogan) - **[Fix]**: Include dependencies required by Metro's published TypeScript declarations (#2149 by @sorinc03) - **[Performance]**: Dev server memory is ~95% lower per lazy-loaded route (`import()` or async routes), and lazy bundle requests are ~2x faster (#2239 by @robhogan) - **[Performance]**: Without Watchman, the dev server is ready to bundle ~2.5-3x faster on Linux and Windows, and ~15% faster on macOS (#2104, #2105, #2106, #2107, #2108, #2219, #2220, #2221, #2240 by @robhogan) - **[Performance]**: Without Watchman, CI builds start bundling ~25-35% sooner on Linux and Windows, and ~15% sooner on macOS (#2104, #2219, #2220, #2240 by @robhogan) - **[Performance]**: At least 10x faster `composeSourceMaps` for large bundles (#2250 by @yhpark) - **[Types]**: Remove undeclared type-only imports between Metro packages. `bundle_options` moves from `metro-core`'s `LogEntry` to `MetroLogEntry`, exported by `metro` - annotate `Logger.on` handlers that read it as `(entry: MetroLogEntry) => ...` (#2257 by @robhogan) > NOTE: Experimental features are not covered by semver and can change at any time. - **[Experimental]**: Share module outputs between graphs with equal transform options, on by default. Set `transformer.unstable_shareTransformResults: false` to opt out if a transform's output depends on inputs outside its cache key, or if a custom serializer writes to module outputs or dependencies (#2239, #2244 by @robhogan) - **[Experimental]**: Add `unstable_hedgeCacheReadsAfterMs`, which transforms a module locally when its cache read is slow and takes whichever finishes first, and `maxInFlightReads` on `HttpGetStore`, which misses rather than queueing once that many reads are outstanding (#2249 by @GijsWeterings) **Full Changelog**: v0.88.0...v0.88.1 ``` ## Shared transform results `transformer.unstable_shareTransformResults` is on by default. `Transformer` keeps one in-memory copy of each module's `output` and `dependencies` per set of transform options, checked before `cacheStores`, and every graph with equal transform options gets that same object. That's where the lazy bundling memory savings come from. Set it to `false` for the previous behavior. It's left out of the transform cache key, so switching it doesn't invalidate any cache. Two kinds of code depend on the old behavior and should opt out: - A transform whose output depends on inputs outside its cache key, and which relies on a cache store declining its result so that it runs again, now gets its first result back for as long as the key is unchanged. In Expo, this showed up as stale Tailwind CSS in dev. - Code that writes to `Module.output` or to dependency data (`TransformResultDependency`), which the types already make read-only, now changes every graph holding the same module. Custom serializers that edit outputs in place are the likely case. Entries are released when no graph in an `IncrementalBundler` (ie `Server`, `runBuild`) holds the module any more. Code that constructs `Transformer` or `DeltaBundler` directly, without `IncrementalBundler`'s `onModulesReleased` wiring, never releases them, so a long-lived `Transformer` keeps the latest result for every module and transform options it has seen. Set the option to `false` there unless that's intended. ## Migration notes None of these need a change for apps on Metro's public API, but integrations using `metro*/private/*` or Metro's types may need one: - `createFileMap` (`metro/private/node-haste/DependencyGraph/createFileMap`) returns `hasteMap: null` unless `hasteImplModulePath` is set or `enableGlobalPackages` is on, and its type is now `?HasteMap`. Callers that read it need a null check, eg `hasteMap?.getModule(...)`. Configs that set either option get the same `HastePlugin` and cache as before. - `CacheManager.write`'s `getSnapshot` now returns the file map's live tree, not a copy. A custom `unstable_fileMapCacheManagerFactory` cache manager must serialize what `getSnapshot` returns before any `await`, or copy it. `TreeFS.getSerializableSnapshot()` still returns a copy. - The node crawler no longer stats regular files up front, so `linkStats()` can return a null `modifiedTime` and `size` for a file Metro hasn't read. `CACHE_BREAKER` is bumped (14 -> 15), so file map caches written by 0.88.0 are rebuilt once. Watchman crawls are unaffected. - File map plugin names must be unique across all plugins. A plugin's `onChanged` may return a summary, published by plugin name on `ChangeEvent.pluginChanges`, and code that builds `ChangeEvent`s by hand needs a `pluginChanges` map. - `TreeFS` gives up on a path after 40 symlink follows, as Linux does, and reports it missing. - The file map's `FileSystem` interface has `isMapped`, and a missing `LookupResult` carries `canonicalMissingPath` and `remainingPath`, so a custom `FileSystem` implementation needs the method and code that builds missing results by hand needs the fields. A `TreeFS` constructed without `setRoots` treats every path as mapped, as before. - Type-only, from removing undeclared type imports between packages: `bundle_options` moves from `metro-core`'s `LogEntry` to `MetroLogEntry`, exported by `metro`, so annotate `Logger.on('log', (entry: MetroLogEntry) => ...)` handlers that read it. `AmbiguousModuleResolutionError#hasteError` is a structural interface, no longer assignable to `DuplicateHasteCandidatesError`. Custom resolvers can't read other fields of `context.dependency.data` (use `context.isESMImport`). `MinifierResult.map` and `decodedMap` are read-only. - `excludeSource` is on `SerializerOptions`, typed `?boolean`, so a custom serializer's options type that narrows it to `boolean` no longer accepts Metro's. ## Test plan ``` node ./scripts/updateVersion 0.88.1 sl diff --stat ``` Only the 17 `packages/*/package.json` manifests change, and every `0.88.0` reference is replaced. Flow, ESLint, Prettier, TypeScript, API snapshots, Markdown lint and Jest pass on this commit. Benchmark (AI-driven): the `[Performance]` figures are net against 0.88.0 from npm, with a byte-identical copy of 0.88.0 as a noise control. Startup used #2104's benchmark app on macOS, Linux and Windows, over 12 interleaved rounds, timed from process start to the first transform: a dev server (`runServer`, watching) taking an immediate bundle request, and a CI build (`runBuild` with `CI=1` and no file map cache). Lazy chunks used Mattermost's iOS dev server with 20 lazily loaded screens, and `composeSourceMaps` used Mattermost's Android release bundle (7,194 modules) and its `hermesc -O` map. Bundles and composed maps are byte-identical between the two versions. These were measured at 1f9812e. None of the seven later commits changes what they time: startup ends before the first transform, the lazy chunk runs read a warm cache, and #2287 changes the crawler only by an equivalent path join. Expo `main` was validated against this release at 1f9812e58d8f, before the last seven commits on `main`, packed as 0.88.1 and wrapped as a local `@expo/metro` 58.2.0. Typecheck and unit tests pass across Expo's Metro packages, as do the repo build, React Server Components, native and Tailwind exports, and dev server SSR, bundles, source maps and file watching. Expo needed changes of its own (sharing off, for the Tailwind case above, and catching up with `excludeSource`, `reservedString` and `globalPrefix`), and no Metro changes. Of the seven later commits, Expo's defaults only reach the constant folding fixes #2215 and #2279, and only where `undefined` is shadowed or a dead branch's `var` is used outside it. Expo CLI has its own file map, so #2287 doesn't reach it, and Expo compiles imports and exports with its own plugin, doesn't memoize inline requires or hedge cache reads, and its default cache store writes atomically already.
Currently, every graph gets its own freshly deserialised copy of each module's transform output from
cacheStores. That's fine with one graph per platform, but lazy bundling serves eachimport()target as a graph of its own, and that graph holds its entire transitive closure - for a lazy route, most of the app. So dev server memory grows with every lazy chunk a session touches, and each new chunk reads its whole closure back out of the cache, which is why lazy requests get slower as well as heavier.This PR shares one in-memory copy of each module's
outputanddependenciesbetween all graphs with equal transform options.Impact
The cost is per lazy graph, and it's predictable. Without sharing, each chunk's graph takes about 2.5x its dev bundle size in heap, and sharing removes ~95% of that:
mainView)import(), no RNEven a trivial screen holds its own copy of React Native and the renderer, so every RN route saves at least ~11MB per platform, and apps with many RN routes save the most. iOS and Android graphs don't share with each other, so that's per route, per platform.
This is also the real explanation for #1191 and #1355, which we closed as lazy bundling compounding memory use under parallel requests. It's the number of lazy graphs that matters, not concurrency, and #1355's "long loading each import" is the same cost showing up as time.
This change
Transformerkeeps the latest transform result for each module (file plus transform options) in memory, checked beforecacheStores.DeltaBundlerlooks up just the released paths in the live graphs, andTransformerdrops the entries no graph holds any more. That's one lookup per released path per graph - an edit that releases a module from each of 392 graphs costs ~6ms in total. A graph that's still building doesn't count as holding anything yet, so a release that lands during a build can drop an entry that graph is about to hold. Later graphs then get a second copy of that module, until it changes or that graph ends. Modules that no graph commits, ie fromgetDependencies, a failed first build or a failed update, aren't released, which keeps prepended scripts shared but can leave the rest held until a later transform of the same module replaces them.getSourceis now created outsidetransformFile. Defined inline, it shared a closure context with the new lookup and kept every file's contents alive (+70MB on Mattermost).Why an opt-out flag
This is non-breaking for consumers that respect Metro's types and cache keys.
Module.outputandTransformResultDependencyare already read-only, Metro never writes to them (the full suite passes with outputs frozen), and every bundle in the benchmarks below is byte-identical with sharing on. Shared objects aren't frozen or copied though, so code that writes to them anyway will now affect every graph holding the same module. And a shared result is reused whenever a module's key is unchanged, even if a cache store declined to store it, so a transform that depends on inputs outside its key, and relies on that to run again, gets its earlier result.Expo is the one consumer we know of that does either, so
@expo/metro-configwill need to opt out for now. Our production tree shaking edits module data in place:reconcileTransformSerializerPluginreplaces output items with their final transform, andtreeShakeSerializerPlugindecrementsimportson dependency data. Both only run underoptimize/usedExports, ie inexpo export, but an export builds several graphs with equal transform options in one server (eg one per DOM component), so with sharing each graph's tree shaking would leak into the others. In dev, CSS modules depend on Tailwind's inputs, which aren't in their key: with PostCSS configured, ourFileStoredeclines to store them and a patch toGraphsends them back through the transformer on every update, so with sharing, Tailwind's CSS wouldn't update. We can drop the opt-out once those passes copy before writing and CSS modules get a key that changes with Tailwind's inputs. Expo's dev env var serializer and packed source map patch also write to outputs, but idempotently, so they're safe to share - the boardsesh bundles below are byte-identical through Expo's serializers.So the option is on by default, with
transformer.unstable_shareTransformResults: falseto opt out. It's stripped before the transformer config is hashed, so it doesn't change any cache keys.Benchmark
AI-driven. Heap is
heapUsedafter two forced GCs, measured in the server process.Mattermost
RN 0.83.9, iOS dev server with watch off, the main bundle and then 20 screens as split-bundle requests, warm
FileStore. Three interleaved runs per mode, heap figures identical across runs. Harness: https://gist.github.com/robhogan/5e68935ddada24ae6b5928340f0ff951mainboardsesh (Expo web)
Expo SDK 58, RN 0.88.1, Expo Router, served by Expo CLI with the app's own
metro.config.js. The main bundle and then every lazy chunk URL it names. One run per mode, so the times are indicative.mainMeta apps(?)
IIRC, the likes of FB Marketplace and Twilight use lazy bundling aggressively - they'll likely see substantially reduced memory and better server responsiveness from this, but it'd need measuring at Meta.
The win would be observable in a real dev session with Metro after navigating around the app to request multiple lazy routes.
Changelog
Test plan
New unit tests, plus an integration test that builds real graphs with sharing on and off, checks which outputs they share, and checks that ending the last graph holding a module drops its entry.
Mattermost: this PR's files compiled into the app's Metro 0.88.0. Besides the runs above, 10 rounds of watch-mode edits to a module every graph holds, half of them adding or removing an import, then requesting all 21 bundles: every bundle byte-identical to
main, with shared entries flat at ~7,320 and heap flat.boardsesh at boardsesh/boardsesh@544f0bb, with this PR backported to Metro 0.87.1 (Expo SDK 58's pin), dropping only 0.88-only code. Expo CLI 58 leaves
asyncRoutesout of the dev web HTML's bundle URL, so withweb.output: 'single'the app's async routes only apply inexpo export. The async routes rows addtransform.asyncRoutes=trueby hand.Not yet tested: HMR to a real client, cold start with parallel chunk requests, Windows.