Skip to content

Comments

Tests: Reduce RAM usage#5577

Merged
RPRX merged 1 commit intomainfrom
test-fix
Jan 21, 2026
Merged

Tests: Reduce RAM usage#5577
RPRX merged 1 commit intomainfrom
test-fix

Conversation

@Fangliding
Copy link
Member

原本的test会尝试直接建立一个和传入长度一样大的切片 在很多地方 这个值是整整一千多万字节 一千多万字节的整个切片
然后写入 导致了极大的GC压力和系统调用压力 个人怀疑就是因为这个导致github CI的测试机不稳定导致test随机出现错误
调整过后RAM占用下降到原来的不到 1% (1GB+ → 3~4MB)

@Fangliding
Copy link
Member Author

所以github action就这么硬吃了七八年的史

@Fangliding
Copy link
Member Author

我点了好几下 re run 都没啥问题 这个古代毛病应该可以被当作修好了

@RPRX RPRX changed the title Try to fix test err Tests: Reduce RAM usage Jan 21, 2026
@RPRX RPRX merged commit a778d3d into main Jan 21, 2026
94 checks passed
nebulabox added a commit to nebulabox/Xray-core that referenced this pull request Jan 28, 2026
* commit 'f6a7e939231e5ec6b167628bf730dc70a3c36707': (90 commits)
  VMess inbound: Optimize replay filter (XTLS#5562)
  Bump github.com/pires/go-proxyproto from 0.9.1 to 0.9.2 (XTLS#5614)
  TUN inbound: Add iOS support (XTLS#5612)
  Geodat: Reduce peak memory usage (XTLS#5581)
  Bump github.com/pires/go-proxyproto from 0.9.0 to 0.9.1 (XTLS#5608)
  Hysteria transport: Support range & random for `interval` in `udphop` as well (XTLS#5603)
  TUN inbound: Enhance Darwin interface support (XTLS#5598)
  XUDP client: Initialize Global ID's BaseKey correctly (XTLS#5602)
  TUN inbound: Disable RACK/TLP recovery to fix connection stalls (XTLS#5600)
  v26.1.23
  common/errors/feature_errors.go: Add PrintNonRemovalDeprecatedFeatureWarning() (XTLS#5567)
  API: Add ListRule() for routing (XTLS#5569)
  Log config: More flexible `maskAddress` (XTLS#5570)
  Bump github.com/miekg/dns from 1.1.70 to 1.1.72 (XTLS#5590)
  Bump github.com/cloudflare/circl from 1.6.2 to 1.6.3 (XTLS#5589)
  Hysteria transport: Fix speedtest issue (XTLS#5587)
  README.md: Add fancyss to Asuswrt-Merlin Clients
  Router: Fix panic in ProcessNameMatcher when source IPs are empty (XTLS#5574)
  README.md: Update links for PassWall & PassWall 2 (XTLS#5572)
  Tests: Reduce RAM usage (XTLS#5577)
  ...

# Conflicts:
#	core/core.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants