Reuse SCCameraKitSession or recreate on every camera launch?

Options

Hello,
While working with the iOS Camera SDK, could you please share some high-level insights regarding the SCCameraKitSession and what happens when an instance of it is created, specially the performance impact? This required to make a decision about whether to reuse a single session instance across multiple camera launches or create a fresh one each time.
Additionally, I am curious about whether this choice will have any impact on the caching of lenses.

Tagged:

Answers

  • stevenxu
    stevenxu Posts: 603 👻
    Options

    @Shreyash Shah Thanks for the thoughtful question. Forwarded to our eng team to respond when they can. Hang tight!

  • Shreyash Shah
    Options

    Thanks @stevenxu , looking forward to it.

  • arashp
    arashp Posts: 52 🔥🔥
    Options

    Hi @Shreyash Shah, thank you for the question. SCCameraKitSession should take 10 to 30 milliseconds to initialize. In most context this should have no performance impact. However, we do recommend not running multiple instances SCCameraKitSession at the same time. It is possible to do so but it can have a performance impact.

    Caching is not affected by SCCameraKitSession initialization.