Skip to content

Portfolio: Enhancement - Consolidate portfolio worklet runtimes to reduce RAM usage#2176

Closed
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:bug/crash-app-watchdog-termination-01
Closed

Portfolio: Enhancement - Consolidate portfolio worklet runtimes to reduce RAM usage#2176
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:bug/crash-app-watchdog-termination-01

Conversation

@cmgustavo
Copy link
Copy Markdown
Member

@cmgustavo cmgustavo commented May 27, 2026

Replace three separate WorkletRuntime instances (main, rates, analysis) with a single shared runtime.

Also fixes resetPortfolioRuntimeClient which was not resetting the main runtime reference.

@cmgustavo cmgustavo requested a review from msalcala11 May 27, 2026 21:12
@bitpay bitpay deleted a comment from sentry Bot May 28, 2026
@cmgustavo
Copy link
Copy Markdown
Member Author

Memory Pressure:

  • Before fix: 1,104,402 KB (~1.08 GB)
  • After fix: 1,074,765 KB (~1.05 GB)
  • Difference: ~29 MB

Private Dirty:

  • Before fix: 904,276 KB (~883 MB)
  • After fix: 865,212 KB (~845 MB)
  • Differente: ~38 MB

The fix saves ~29–38 MB, that is not sufficient to prevent the WatchdogTermination. iOS crashes the app at roughly 1.2–1.5 GB on iPhone 11 Pro. So, PR is not solving current issue.

@cmgustavo cmgustavo closed this May 28, 2026
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