Skip to content

feat(profiling): add dev-profiling Cargo profile for fast iteration#284

Merged
streamer45 merged 1 commit intomainfrom
devin/1775893013-dev-profiling-profile
Apr 11, 2026
Merged

feat(profiling): add dev-profiling Cargo profile for fast iteration#284
streamer45 merged 1 commit intomainfrom
devin/1775893013-dev-profiling-profile

Conversation

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor

@staging-devin-ai-integration staging-devin-ai-integration bot commented Apr 11, 2026

Summary

Adds a dev-profiling Cargo profile and corresponding justfile recipes so profiling no longer requires a full release-lto build. Two profiling modes are now available:

Dev (dev-profiling) Release (release-lto)
Recipe just skit-profiling-dev serve just skit-profiling serve
LTO None Thin
opt-level 2 (workspace), 3 (codecs via inherited overrides) 3 + LTO
Incremental Yes No
target-cpu=native No Yes
Frame pointers Yes Yes
Use case Quick iteration, find bottlenecks Production-accurate profiles

Cargo.toml: New [profile.dev-profiling] inheriting from dev with opt-level = 2. Inherits the existing per-package codec overrides (rav1e, rav1d at opt-level 3) and incremental compilation. No LTO means no expensive link step.

justfile:

  • New build-skit-profiling-dev and skit-profiling-dev recipes
  • Updated doc comments on existing release profiling recipes to clarify they're the production-accurate path
  • Updated all profiling hint/error messages to mention both modes

Both modes enable the same --features profiling (pprof + jemalloc) and share the same HTTP profiling endpoints (profile-fetch, profile-web, profile-flame, heap-profile-*).

Review & Testing Checklist for Human

  • Verify just skit-profiling-dev serve compiles and starts significantly faster than just skit-profiling serve on your machine (the main goal of this PR)
  • Confirm profiles captured from a dev-profiling build are useful enough to identify bottlenecks (opt-level 2 without LTO should give representative call stacks)
  • Verify just skit-profiling serve still works identically to before (only doc comment changes)

Notes

  • The dev-profiling profile drops -C target-cpu=native to keep the compilation cache stable between regular dev builds and profiling builds. If you want native SIMD tuning in dev profiles, you can manually run with RUSTFLAGS="-C force-frame-pointers=yes -C target-cpu=native".
  • After the first dev-profiling build populates the cache, subsequent rebuilds benefit from incremental compilation — only changed workspace crates are recompiled.

Link to Devin session: https://staging.itsdev.in/sessions/de77f5d7265a47dcb8c782c9fe08e6e6
Requested by: @streamer45


Staging: Open in Devin

Add a 'dev-profiling' Cargo profile that inherits from 'dev' with
opt-level 2. This gives meaningful profiles (inlining, vectorisation)
without the expensive LTO link step, and benefits from incremental
compilation for fast rebuilds.

Two profiling modes are now available:

  Dev (fast):    just skit-profiling-dev serve
  Release (accurate): just skit-profiling serve

The dev mode drops target-cpu=native (vs release) so the cache stays
stable across rebuilds. Both modes enable frame pointers for pprof and
share the same HTTP profiling endpoints.

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@staging-devin-ai-integration staging-devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Staging: Open in Devin
Debug

Playground

@streamer45 streamer45 merged commit 126af39 into main Apr 11, 2026
17 checks passed
@streamer45 streamer45 deleted the devin/1775893013-dev-profiling-profile branch April 11, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants