perf: 字符串拼接用 push_to_string 消去中间分配, GC阈值 8M→32M

- oxide_runtime_api 新增 push_to_string: 直接将 JsValue 写入 String buffer
- dispatch_add / dispatch_compound_add 复用 Vm::string_buf, 每次concat从4次分配降到1次
- vm_support 新增 new_string_owned 接受 String 转移所有权
- kernel session_gc_threshold 8MB→32MB 减少频繁 GC
- build.sh: make clean 清跨平台 .obj 残留

(cherry picked from commit ad7b044a5a24b23819d783c5419d3e33f936dfc5)
This commit is contained in:
2026-06-29 14:04:50 +08:00
parent ba7b9b9182
commit da75f3a214
6 changed files with 76 additions and 13 deletions
+3 -3
View File
@@ -39,7 +39,7 @@ impl KernelConfig {
max_dead_strings: Some(10_000),
max_steps: None,
max_call_depth: 1024,
session_gc_threshold: 8_388_608,
session_gc_threshold: 33_554_432,
max_cached_modules: 512,
log_levels: [Level::Off; SUBSYSTEM_COUNT],
warmup_builtin_shapes: true,
@@ -55,7 +55,7 @@ impl KernelConfig {
max_dead_strings: Some(10_000),
max_steps: None,
max_call_depth: 1024,
session_gc_threshold: 8_388_608,
session_gc_threshold: 33_554_432,
max_cached_modules: 512,
log_levels: [Level::Off; SUBSYSTEM_COUNT],
warmup_builtin_shapes: true,
@@ -71,7 +71,7 @@ impl KernelConfig {
max_dead_strings: Some(5_000),
max_steps: None,
max_call_depth: 1024,
session_gc_threshold: 8_388_608,
session_gc_threshold: 33_554_432,
max_cached_modules: 512,
log_levels: [Level::Off; SUBSYSTEM_COUNT],
warmup_builtin_shapes: true,