fix(cwl-demangle): increase timeout and chunk size for large Swift binaries - #649
Open
sentry[bot] wants to merge 1 commit into
Conversation
…naries Fixes [LAUNCHPAD-6G](https://sentry.sentry.io/issues/7193300364/) Large Swift binaries with 200,000+ symbols cause cwl-demangle subprocess to exceed the 10-second timeout when processing individual chunks in parallel. Four parallel ThreadPoolExecutor threads each launching a cwl-demangle subprocess simultaneously causes CPU/memory contention. - Increase DEFAULT_CHUNK_SIZE from 500 to 5000, reducing the number of subprocess launches by 10x (e.g., 200k symbols: 400 chunks → 40) - Increase DEFAULT_DEMANGLE_TIMEOUT from 10s to 120s, giving each subprocess adequate time even under contention with parallel workers Both values remain configurable via LAUNCHPAD_DEMANGLE_CHUNK_SIZE and LAUNCHPAD_DEMANGLE_TIMEOUT environment variables.
Contributor
Author
Size Analysis1 component analyzed, 1 component processing iOS Builds
Android Builds
|
Contributor
Author
📲 Install BuildsiOS
Android
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes LAUNCHPAD-6G
Problem
Large Swift binaries with 200,000+ symbols (e.g. VDIT.app, 296MB install size) cause
cwl-demanglesubprocess to exceed the 10-second timeout when processing individual chunks in parallel.Root cause chain:
DEFAULT_CHUNK_SIZE=500, this creates 400+ chunkscwl-demanglesubprocesses run concurrently viaThreadPoolExecutorcwl-demanglecalls to exceed the 10-secondDEFAULT_DEMANGLE_TIMEOUTTimeoutExpiredis raised, and the chunk's symbols are silently lost (returned as empty{})Fix
Increase
DEFAULT_CHUNK_SIZEfrom500→5000: reduces the number of subprocess launches by 10x (e.g., 200k symbols goes from 400 chunks to 40 chunks), which dramatically reduces subprocess overhead and CPU contention between parallel workers.Increase
DEFAULT_DEMANGLE_TIMEOUTfrom10s→120s: gives each subprocess adequate time to complete even under contention with parallel sibling processes.Both values remain configurable via
LAUNCHPAD_DEMANGLE_CHUNK_SIZEandLAUNCHPAD_DEMANGLE_TIMEOUTenvironment variables for fine-tuning in production.