Skip to content

Purchases.getOfferings() performance issue #755

Description

@hatem-72

Describe the bug
On IOS devices calling Purchases.getOfferings() is extremely slow. For exemple it takes up to 10 seconds on the Iphone 14 I have under my eyes. At least when called for the first time.

  1. Environment

    1. Platform: IOS
    2. SDK version: 7.1.0
    3. OS version: 16.4
    4. Xcode/Android Studio version: 14.3
    5. React Native version: 0.72.6
    6. SDK installation (CocoaPods + version or manual): CocoaPods ~> 1.13
  2. Debug logs that reproduce the issue

    Not relevant

  3. Steps to reproduce, with a description of expected vs. actual behavior

const startTs = Date.now();
const offerings = await Purchases.getOfferings();
const endTs = Date.now();
console.log(`⏰ Revenue Cat: getOfferings took ${endTs - startTs}ms`);
// output: ⏰ Revenue Cat: getOfferings took 9454ms
  1. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

    I must say that I have about fifteen different offerings. And I am calling this method right after SDK setup in order to display a paywall on app opening.

    Not tested on Android yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriaged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions