Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/FIXTURES/BABYLON.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ and slowest fixture in the suite.
**Workspace resolution at scale.** Every other fixture is a single package; this
one is 86 of them with internal cross-dependencies, which is a different problem
from installing a wide flat graph. It is the fixture that catches a tool handling
`workspace:` protocol specifiers, hoisting, or link topology badly.
cross-workspace ranges, hoisting, or link topology badly.

It is also the only fixture whose own `vlt.json` declares workspaces.

Its 323 references between workspace packages are plain semver ranges, not
`workspace:`, and every tool gets them as committed. See
[METHODOLOGY](../METHODOLOGY.md#what-a-benchmark-is-here) for how each tool
links them.

## Variations

All install variations. No `build`, `build-cache` or `run`.
Expand Down
24 changes: 24 additions & 0 deletions docs/METHODOLOGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,30 @@ vlt can also be pointed at `registry.npmjs.org`; these numbers don't measure
that. The `registry-*` variations are the ones that hold the client constant
and compare registries.

Fixtures are installed as committed, with the same dependency specs for every
tool (berry and zpm still get their `packageManager` pin and `.yarnrc.yml`).
In `babylon`, workspace packages depend on each other by plain semver range
(`"@dev/core": "^1.0.0"`), not `workspace:`, and each tool links them its own
way:

- vlt rewrites most of those ranges (257 of 323) to `workspace:*` in
`package.json` on its first install. That rewrite is part of its timed run
wherever the manifests start out unmigrated, which is `clean`; in the other
variations the untimed first warmup migrates them. vlt 1.8.0 leaves the 66
exact and peer specs on the published `@babylonjs/*` names as they are, and
in about half of cold installs it resolves four of them (`gui`, `loaders`,
`materials`, `serializers`) to registry copies instead of the workspace,
downloading 4 extra tarballs ([vltpkg/vltpkg#2154](https://github.com/vltpkg/vltpkg/issues/2154)).
So vlt's `babylon` `clean` results can differ between runs until that is
fixed.
- pnpm links them (the fixture's `pnpm-workspace.yaml` sets
`linkWorkspacePackages: true`), but first asks the registry for each one:
about 240 lookups per cold install, most answered 404 for private packages.
It also installs `@babylonjs/shared-ui-components`, a peer dependency, from
the registry.
- Every tool downloads `babylonjs-gltf2interface@6` from the registry, because
`packages/tools/devHost` asks for `^6.42.0` and the workspace has 8.49.6.

vlt finishes some work in detached processes that keep running after the
`vlt` command exits: unpacking fetched tarballs into its cache (about 19
seconds after a cold `babylon` install), revalidating cached manifests,
Expand Down
106 changes: 0 additions & 106 deletions suite/scripts/add-workspace-protocol.js

This file was deleted.

3 changes: 3 additions & 0 deletions suite/scripts/clean-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ clean_git() {
fi
}

# vlt rewrites plain ranges that link a workspace sibling to `workspace:*`
# (on `babylon`, 80 package.json files) on its first install. Restore the
# fixture's manifests so the next tool starts from the project as committed.
clean_workspace_protocol() {
echo "Restoring package.json files (undo workspace: protocol changes)..."
if command -v git &> /dev/null && git rev-parse --git-dir > /dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion suite/scripts/variations/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ BENCH_SETUP_BERRY="touch yarn.lock; echo \"$BENCH_COMMAND_YARN_MODERN_CONFIG\" >
BENCH_SETUP_ZPM="touch yarn.lock; echo \"$BENCH_COMMAND_YARN_MODERN_CONFIG\" > .yarnrc.yml; { echo '[zpm prepare]'; echo 'cwd:'; pwd; echo 'package.json:'; ls -la package.json || true; echo 'yarn path:'; command -v yarn || true; echo 'yarn version:'; yarn -v || true; echo 'canary version:'; echo \"$BENCH_ZPM_VERSION\"; echo 'packageManager (before):'; npm pkg get packageManager || true; echo 'set packageManager=yarn@'"$BENCH_ZPM_VERSION"':' ; npm pkg set packageManager=\"yarn@$BENCH_ZPM_VERSION\" || true; echo 'packageManager (after):'; npm pkg get packageManager || true; } >> $BENCH_OUTPUT_FOLDER/zpm-prepare.log 2>&1"
BENCH_SETUP_PNPM="npm pkg delete packageManager >/dev/null 2>&1 || true"

BENCH_SETUP_VLT="node $BENCH_SCRIPTS/add-workspace-protocol.js . >> $BENCH_OUTPUT_FOLDER/vlt-prepare.log 2>&1"
BENCH_SETUP_VLT=""
BENCH_SETUP_BUN=""
BENCH_SETUP_DENO=""
BENCH_SETUP_AUBE="npm pkg delete packageManager >/dev/null 2>&1 || true"
Expand Down