Skip to content

2.8.2 - #457

Merged
ianrumac merged 16 commits into
mainfrom
develop
Aug 31, 2026
Merged

2.8.2#457
ianrumac merged 16 commits into
mainfrom
develop

Conversation

@ianrumac

Copy link
Copy Markdown
Collaborator

Changes in this pull request

Enhancements

  • Significantly improves paywall loading times, reducing memory and CPU footprint when preloading
  • Implicit placements that map to no campaign (e.g. app_launch, session_start) no longer occupy the presentation queue ahead of register() calls while waiting for entitlements.
  • Config refreshes now diff paywalls by cache key and only evict changed ones from the request cache, so unchanged preloaded paywalls stay warm across refreshes.
  • The loading shimmer no longer forces a software layer
  • Logs are now delivered on a dedicated background thread

Fixes

  • The popup presentation style's entrance animation no longer stretches to the paywall's configured loading delay, and the delay no longer postpones hiding the spinner after a purchase completes.
  • paywall_resourceLoad_fail events now report the failing resource's URL.
  • A SuperwallDelegate.handleLog implementation that throws no longer propagates the exception into whatever SDK code produced the log.

Potentially Breaking Changes

  • SuperwallDelegate.handleLog is now always called on a background thread. It could previously be called on any thread, including main, so implementations that touch UI directly must now dispatch to the main thread themselves.

Checklist

  • All unit tests pass.
  • All UI tests pass.
  • Demo project builds and runs.
  • I added/updated tests or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run ktlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

github-actions Bot and others added 15 commits August 11, 2026 15:53
…nd rule evaluation

- Publish config as Retrieved immediately after ApplyConfig; run product
  warm-up and enrichment resolution in the background instead of gating
  every presentation on them
- Run configure()'s config fetch and identity setup concurrently
- Fast-path implicit triggers that map to no placement so app_launch/
  session_start no longer head-of-line block register() on the serial queue
- Await entitlements and config concurrently in the presentation pipeline
- Sync subscription status without gating local Play queries on config;
  await billing connection instead of fixed retry sleeps; query SUBS and
  INAPP purchases and product details concurrently
- Make PaywallRequestManager dedup thread-safe (ConcurrentHashMap with
  atomic in-flight claim) and fire lifecycle analytics without blocking
  the load path
- Diff config refreshes by paywall cacheKey and evict only changed
  paywalls from the response cache; invalidate the preload fingerprint on
  refresh changes and fresh assignments so re-preload actually runs
- Make PaywallViewCache synchronous (removes fire-and-forget writes and
  runBlocking reads on a multi-threaded dispatcher)
- Only treat main-frame webview errors as page failures; subresource
  failures no longer restart the page or count toward fallback attempts;
  bounded main-frame retry now works on API 26+
- Animate shimmer via view alpha on a hardware layer instead of
  re-rasterizing a software-layer vector every frame
- Use the fixed default duration for the popup entrance animation and
  apply presentation.delay only to the initial reveal, not the
  post-purchase spinner
- Build the rule-evaluation base context once per evaluation pass while
  resolving computed properties fresh per rule
- Count trigger rule occurrences with SQL COUNT instead of materializing
  rows; give event-data inserts their own serial lane
- Construct log strings lazily on the paywall hot path

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCNtq6WEfD6su3SjFuhfHV
- Serialize lifecycle analytics on a single lane so start/complete event
  pairs keep their order; guard against zombie fetches from cancelled
  callers; close the double-fetch window in saveRequestHash; skip stale
  cache writes when the request cache was invalidated mid-flight
- Bound-await enrichment (1s) before publishing config as Retrieved so
  fresh installs don't evaluate audience filters without enrichment
- Await a valid config before starting the 30s assignments timeout so a
  slow config fetch can't permanently skip the initial assignment restore
- Retry the config wait once after entitlements resolve so the concurrent
  waits never tolerate less config latency than the old sequential path
- Track billing connection as Connecting/Connected/Failed so restores
  fail fast when billing can never connect; defer Inactive status until
  config has been applied or failed so test mode is respected
- Record main-frame webview errors synchronously so the load retry cap
  can't be reset by the failed load's own onPageFinished; treat failures
  of the paywall runtime bundle as page-level again so fallback URLs
  still engage; report the failing resource's URL in resource-load events
- Build shared rule-evaluation attributes lazily and contain their
  failures so attribute errors degrade to no-match instead of aborting
  the presentation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCNtq6WEfD6su3SjFuhfHV
…-plr321

Improve paywall loading performance and fix concurrency issues
@ianrumac
ianrumac merged commit c473e3c into main Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants