Skip to content

fix(speedtest): test custom JSON profiles concurrently - #6457

Open
XuliGan4eg2006 wants to merge 1 commit into
2dust:masterfrom
XuliGan4eg2006:fix/custom-real-delay-concurrency
Open

XuliGan4eg2006 wants to merge 1 commit into
2dust:masterfrom
XuliGan4eg2006:fix/custom-real-delay-concurrency

Conversation

@XuliGan4eg2006

Copy link
Copy Markdown

Problem

On subscriptions served as Xray JSON (e.g. Remnawave), "Test real delay"
is much slower than on the same subscription as share links. Each entry is stored as a
custom profile, and custom profiles were probed one at a time (global mutex from #6083),
untrimmed, and without the fast TCP pre-check. Each dead server could block the queue
for ~24 s.

Changes

  • Custom configs are trimmed to log + outbounds (no mux) before probing, the same
    trimming generated profiles get. The native probe keeps only these parts anyway, so
    results don't change.
  • Only custom configs with a WireGuard outbound stay serialized (the crash case from
    [Bug]: App stops during real-latency testing of WireGuard configs. #6077). All other custom profiles use the normal real-ping concurrency.

Result

On my subscription (79 custom profiles), the real-delay test went from ~10 min to ~1 min.

Testing

  • Unit tests added for config trimming and the serialization rule.
  • testPlaystoreDebugUnitTest and assemblePlaystoreDebug passed on GitHub Actions.
  • Tested on a physical arm64 device.

Custom profiles (full Xray JSON, e.g. Remnawave-style JSON subscriptions)
were sent to the delay probe untrimmed and serialized behind a global
mutex, so a JSON subscription was tested one profile at a time and each
unreachable server cost up to two 12 s attempts before the next started.

- Reduce custom configs to log + outbounds (mux removed) before probing,
  matching what the native probe keeps and postProcessForSpeedtest does
  for generated profiles. This also stops injecting a TUN inbound into
  probe configs.
- Keep global serialization only for custom configs containing a
  WireGuard outbound, the case that reproduced the native panic in 2dust#6077.
  Other custom profiles use the configured real-ping concurrency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant