How can I profile this type of slowdown?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • flamegraph

    Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3 (by flamegraph-rs)

  • Thanks, I actually tried flamegraph-rs but it didn't help me very much because the functions were recursive so it's not immediately clear what's taking long on the graph.

  • cheatsheets

  • You can see my flamegraph here, it's not very clear that the clone is taking up a lot of time. Is there some tool that gives me a percentage of total time that is spent on one function? Then I could easily see that the clone is taking a long time

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • cargo-asm

    cargo subcommand showing the assembly or llvm-ir generated for Rust code

  • You're best bet at the moment is probably using cargo-asm to inspect the function assembly to see when it is performing the correct TCO.

  • tracing

    Application level tracing for Rust.

  • You can use https://crates.io/crates/tracing to trace calls to the recursive function, print out the arguments and see which values are making it slow

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts