perf: ~23.5% startup performance improvements

After series of flamecharts analyzing I found some bottlenecks and fixed them
This commit is contained in:
Observer KRypt0n_ 2023-02-25 23:39:50 +02:00
parent 1755faaab1
commit d80156696e
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
4 changed files with 16 additions and 13 deletions

4
.gitignore vendored
View file

@ -1,2 +1,4 @@
/target /target
/assets/locales/TODO.*
flamegraph.svg
perf.data*

18
Cargo.lock generated
View file

@ -31,7 +31,7 @@ dependencies = [
[[package]] [[package]]
name = "anime-game-core" name = "anime-game-core"
version = "1.3.3" version = "1.3.4"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bzip2", "bzip2",
@ -1598,18 +1598,18 @@ dependencies = [
[[package]] [[package]]
name = "num_enum" name = "num_enum"
version = "0.5.7" version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
dependencies = [ dependencies = [
"num_enum_derive", "num_enum_derive",
] ]
[[package]] [[package]]
name = "num_enum_derive" name = "num_enum_derive"
version = "0.5.7" version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
dependencies = [ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
@ -2104,9 +2104,9 @@ dependencies = [
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.20.7" version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
dependencies = [ dependencies = [
"log", "log",
"ring", "ring",
@ -2864,9 +2864,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "wincompatlib" name = "wincompatlib"
version = "0.2.0" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ee6c64894fe24609e0d3b47f2715bf9f5c25a754c4a5b96599c5650266d291d" checksum = "dc89c4d0966a643396fdabb985f1daed8c6ad439977ede3c03d252924dde5b2e"
dependencies = [ dependencies = [
"derive_builder", "derive_builder",
] ]

@ -1 +1 @@
Subproject commit 2e726358a2a74af9f35a5c55ea3bc6e7025575ae Subproject commit c8b905d2637d108e1df7d898d8a8d327e30661af

View file

@ -713,11 +713,12 @@ impl SimpleComponent for App {
} }
LauncherState::VoiceUpdateAvailable(_) => todo!(), LauncherState::VoiceUpdateAvailable(_) => todo!(),
LauncherState::VoiceOutdated(_) => todo!(),
LauncherState::VoiceNotInstalled(_) => todo!(), LauncherState::VoiceNotInstalled(_) => todo!(),
LauncherState::GameUpdateAvailable(_) => todo!(), LauncherState::GameUpdateAvailable(_) => todo!(),
LauncherState::GameOutdated(_) => todo!(),
LauncherState::GameNotInstalled(_) => todo!(), LauncherState::GameNotInstalled(_) => todo!(),
LauncherState::VoiceOutdated(_) |
LauncherState::GameOutdated(_) => ()
} }
} }