Skip to content

Open the Anycubic cloud session off the main loop (1.1 s freeze) #21

Description

@BenGlut

What happens

When the shared Anycubic cloud session opens, the main loop is blocked for about 1.1 s - the screen stops drawing and does not answer taps. Measured with the bench profiler (tigerspool-bench, [bench] slow pass ... links=1132), once per session opening: at boot, and after the session is lost.

Why

anycubic_cloud::loop() connects from the main loop: DNS, TCP, the TLS handshake with the client certificate (net/legacy_tls_client.cpp) and the MQTT CONNECT all run inline. The Bambu cloud session has the same shape.

What to do

Open the session on a background task (core 0, as the account sync and the presence beat already do), and let the main loop only pump an open session. Keep one session per account and the stand-down during a firmware download (1.69.1) intact.

Measure again with tigerspool-bench before and after.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions