Heads up! We're sunsetting this forum to streamline our community space.

join us on Discord for support, updates, and all things Snap AR! See you there!
Sign up for our live Camera Kit office hour on July 17 @ 9:30am (PT) / 4:30pm (GMT)

Reuse SCCameraKitSession or recreate on every camera launch?

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: 612 👻

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

  • Thanks @stevenxu , looking forward to it.

  • arashp
    arashp Posts: 52 🔥🔥

    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.

Categories