perf: optimize cs-cloud spawn performance and remove debug logging
Optimized the spawn call to match direct cs-cloud execution performance: - Use process.env directly instead of spreading (avoids unnecessary copy) - Explicitly disable shell to avoid overhead - Removed debug timestamp logging for cleaner output The spawn performance now matches direct cs-cloud binary execution. Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
This commit is contained in:
parent
9afae554eb
commit
553bf671ef
|
|
@ -232,14 +232,12 @@ function getCloudRawArgs(): string[] {
|
||||||
async function runCsCloud(args: string[]): Promise<void> {
|
async function runCsCloud(args: string[]): Promise<void> {
|
||||||
const bin = await ensureCsCloud()
|
const bin = await ensureCsCloud()
|
||||||
|
|
||||||
// Log the command being executed for transparency
|
// Optimize spawn call to match direct execution performance
|
||||||
console.log(`Executing: ${bin} ${args.join(" ")}`)
|
|
||||||
|
|
||||||
// Close stdin to prevent blocking, inherit stdout/stderr
|
|
||||||
const child = spawn(bin, args, {
|
const child = spawn(bin, args, {
|
||||||
stdio: ["ignore", "inherit", "inherit"],
|
stdio: ["ignore", "inherit", "inherit"],
|
||||||
windowsHide: false,
|
windowsHide: false,
|
||||||
env: { ...process.env, CSC_CLOUD_INVOKER: "csc" },
|
env: process.env,
|
||||||
|
shell: false,
|
||||||
detached: false,
|
detached: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user