Lens Loading & Performance?

Options
aidan
aidan Posts: 32 🔥

Hi!

I notice while a Lens loads the camera hangs for 1-2 seconds which is a less than desirable experience. It's the same in Snapchat though so I'm wondering if we can chart a solution for our CameraKit usecases.

Would be great to know what actually causes this hang - ARKit services kicking on? Purely inefficient synchronous Lens loading? Let's figure it out!

Answers

  • stevenxu
    stevenxu Posts: 611 👻
    Options

    @aidan Thanks for raising this. Confirming ticket created for our eng team to investigate. Will get back to you as soon as we can.

  • stevenxu
    stevenxu Posts: 611 👻
    Options

    @aidan As I'm rereading this, this symptom of that 1-2 seconds always existed it sounds so this is suggestion to improve that efficiency right? Just trying to evaluate if this was unusual behavior (bug).

  • stevenxu
    stevenxu Posts: 611 👻
    Options

    @aidan Ops scratch my last comment^.

    Our eng team confirmed the Camera hang for 1-2sec is not normal. They are requesting the following from you to investigate and resolve:
    1. Please provide us more details about your set up.
    2. Please provide us a video of the hang.
    3. Please confirm if the hang is reproducible on the Camera Kit sample app.

    I'll open up a direct message thread if you prefer to share the above two items privately.

    Thanks!

  • aidan
    aidan Posts: 32 🔥
    Options

    @stevenxu

    1. Please provide us more details about your set up.

    I think it has to do with the Lenses themselves. Back facing, world tracking + world meshing. Heavy on the AR feature set is my assumption of why it hangs. Otherwise, exporting Lens Studio 4.40.1, using the most recent CameraKit, loading from the Snap cloud.

    1. Please provide us a video of the hang.

    I've recorded two screen captures for you to review!

    Snapchat - Here's a good capture of the quite aggressive loading bug inside Snapchat. Remembering back I believe it started when World Mesh was added to my Adventure Engine:

    https://streamable.com/3dcbxl

    CameraKit - I even go as far as preload the camera + CameraKit in background and keep it observed (which makes it feel much faster) however as soon as I apply the Lens it hangs for a second:

    https://streamable.com/0jodpv

    1. Please confirm if the hang is reproducible on the Camera Kit sample app.

    The hang is reproducible in the sample app

  • stevenxu
    stevenxu Posts: 611 👻
    Options

    @aidan thank you!!! Confirming receipt & shared with the team investigating.

    They're also asking for:

    • Camera Kit SDK Version
    • Device models affected
    • Platform (iOS, android, both)
  • aidan
    aidan Posts: 32 🔥
    Options

    @stevenxu

    Camera Kit SDK Version

    1.20.0

    Device models affected

    iPhone 12 Pro (16.3.1)

    Platform

    iOS only, haven't tested on Android

  • stevenxu
    stevenxu Posts: 611 👻
    Options

    @aidan Thanks! Will share any follow ups or next steps from our eng. Hang tight

  • stevenxu
    stevenxu Posts: 611 👻
    Options

    @aidan quick update: our eng team is still discussing this matter. I'll follow up with them again. fyi - this week and next is a bit busier than usual due to the upcoming Snap Partner Summit so I appreciate your patience on this!

  • stevenxu
    stevenxu Posts: 611 👻
    Options

    @aidan Our team is requesting if you could send us your LS project to help with the investigation. If you are comfortable, you can send it in the DM thread we have or my email.