cv-frontend-vue icon indicating copy to clipboard operation
cv-frontend-vue copied to clipboard

Performance Optimization: Enhanced Release Builds

Open gitsofaryan opened this issue 8 months ago • 3 comments

Describe the changes you have made in this PR -

This updates our Cargo.toml release profile to optimize binary size and runtime performance for the CircuitVerse Tauri based Simulator. These changes ensures efficient performance across all operating systems and are based on proven best practices for Vue and Tauri applications. reference : tauri-vue

Clean Release Builds:
  • incremental = false: Disables incremental builds for release, ensuring that each build of all Oses is fully optimized without residual artifacts.
Improved Cross-Module Optimization:
  • codegen-units = 1: Using a single code generation unit, allowing the compiler to perform better among cross-module optimizations for a smaller, faster binary.
Global Optimization:
  • lto = true: Enables Link Time Optimization, which optimize all modules during the linking stagefor to reduce redundant code and improve performance.
Binary Size Optimization:
  • opt-level = "s": Optimize for small binary size.
Efficient Panic Handling:
  • panic = "abort": Configures the application to abort immediately on panic, removing the overhead of stack unwinding and reducing binary size.
Stripping Debug Data:
  • strip = true, debug = false, and debug-assertions = false: Remove non-essential debug symbols and runtime assertions, further reducing the binary footprint.

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

Summary by CodeRabbit

  • Chores
    • Improved development builds for faster iterative performance.
    • Enhanced production builds for optimized performance and reduced binary size.

gitsofaryan avatar Mar 14 '25 09:03 gitsofaryan