mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-28 16:09:17 +00:00
perf: add JVM flags for faster agent cold start
Use -XX:TieredStopAtLevel=1 and -XX:+UseSerialGC to skip C2 compilation and reduce GC init overhead on agent process startup.
This commit is contained in:
@@ -22,8 +22,7 @@ impl AgentDriverClient {
|
||||
/// Blocks (async) until the agent writes `{"ready":true}` to stdout.
|
||||
pub async fn spawn(java_path: &str, jar_path: &str) -> Result<Self, String> {
|
||||
let mut child = Command::new(java_path)
|
||||
.arg("-jar")
|
||||
.arg(jar_path)
|
||||
.args(["-XX:TieredStopAtLevel=1", "-XX:+UseSerialGC", "-jar", jar_path])
|
||||
.stdin(Stdio::piped())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::inherit())
|
||||
|
||||
Reference in New Issue
Block a user