Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: perf: avoid redundant CLI runtime spawn
Summary
already running under the runtime selected by its lockfile.
Node and Bun, and preserve the current source-checkout path.
process.argv[1]withdist/cli/qmd.jsbefore import so the CLI'sexisting main-module guard behaves as it does during a direct invocation.
launcher process.
The published
bin/qmdlauncher currently starts another copy of the selectedruntime even when npm or Bun has already invoked the launcher with that exact
runtime. Removing that duplicate process reduces the fixed cost of every QMD
CLI call without changing runtime selection or source-mode behavior.
Windows benchmark
QMD 2.8.3, Windows 11, Node 26.7.0, Bun 1.4.0 and Bun 1.4.0 canary. Nine
interleaved keyword-search runs per runtime against the same four-document
synthetic corpus:
The Bun result also includes removal of a Windows-only
cmd.exehop, so thesepercentages should not be generalized to POSIX hosts without separate data.
Model-backed cold starts remain dominated by native runtime/model loading; this
change targets the avoidable Windows launcher cost on every command.
Verification
oxlint .tsc -p tsconfig.build.json --noEmitWindows and remains a CI validation item
git diff --checkThe POSIX wrapper fixtures execute extensionless shebang files directly and
are not runnable through native Windows
execFileSync; the new cross-platformPID assertions pass under both runtimes. The package smoke now also exercises
both compiled-distribution wrapper paths.
Local branch
dbfd0b4736aeaf761d1a16ca8e424f071df8feb9dbc829aperf/in-process-cli-launcher