mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #1317] [MERGED] perf(cargo): make schemars derives optional #1321
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1317
Author: @LGUG2Z
Created: 3/3/2025
Status: ✅ Merged
Merged: 3/4/2025
Merged by: @LGUG2Z
Base:
master← Head:feature/devperf📝 Commits (1)
4a80457perf(cargo): make schemars derives optional📊 Changes
50 files changed (+376 additions, -466 deletions)
View changed files
📝
Cargo.toml(+1 -14)📝
justfile(+13 -4)📝
komorebi-bar/Cargo.toml(+6 -2)📝
komorebi-bar/src/battery.rs(+2 -2)📝
komorebi-bar/src/config.rs(+29 -17)📝
komorebi-bar/src/cpu.rs(+2 -2)📝
komorebi-bar/src/date.rs(+6 -4)📝
komorebi-bar/src/keyboard.rs(+2 -2)📝
komorebi-bar/src/komorebi.rs(+12 -7)📝
komorebi-bar/src/komorebi_layout.rs(+2 -2)📝
komorebi-bar/src/main.rs(+2 -2)📝
komorebi-bar/src/media.rs(+2 -2)📝
komorebi-bar/src/memory.rs(+2 -2)📝
komorebi-bar/src/network.rs(+2 -2)📝
komorebi-bar/src/render.rs(+8 -5)📝
komorebi-bar/src/storage.rs(+2 -2)📝
komorebi-bar/src/time.rs(+4 -3)📝
komorebi-bar/src/update.rs(+2 -2)📝
komorebi-bar/src/widget.rs(+2 -2)📝
komorebi/Cargo.toml(+3 -1)...and 30 more files
📄 Description
This commit makes all schemars::JsonSchema derives optional. After analyzing the output of cargo build timings and llvm-lines, it was clear that the majority of the 2m+ incremental dev build times was taken up by codegen, and the majority of it by schemars.
Developers can now run cargo commands with --no-default-features to disable schemars::JsonSchema codegen, and all justfile commands have been updated to take this flag by default, with the exception of the jsonschema target, which will compile with all derives required to export the various jsonschema files.
Incremental dev build times for komorebi.exe on my machine are now at around ~18s, while clean dev build times for the entire workspace are at around ~1m.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.