Add basic stages profiling and update depencedcies versions
This commit is contained in:
Generated
+336
-194
File diff suppressed because it is too large
Load Diff
+14
-9
@@ -1,22 +1,22 @@
|
||||
[package]
|
||||
name = "jap_learn"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
iced = { version = "0.14.0", features = ["tokio", "svg"]}
|
||||
iced_core = "0.14.0"
|
||||
rand = "0.10.1"
|
||||
rand = "0.10.2"
|
||||
dirs = "6.0.0"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.149"
|
||||
rhai = "1.24.0"
|
||||
chrono = "0.4.44"
|
||||
rusqlite = { version = "0.40.1", features = ["chrono", "bundled"] }
|
||||
reqwest = { version = "0", features = ["json", "stream", "multipart"] }
|
||||
serde = { version = "1.0.229", features = ["derive"] }
|
||||
serde_json = "1.0.151"
|
||||
rhai = "1.25.1"
|
||||
chrono = "0.4.45"
|
||||
rusqlite = { version = "0.40.2", features = ["chrono", "bundled"] }
|
||||
reqwest = { version = "0.13.4", features = ["json", "stream", "multipart"] }
|
||||
rodio = "0.22.2"
|
||||
sha2 = "0.11.0"
|
||||
tokio = { version = "1.50.0", features = ["rt", "rt-multi-thread", "macros"] }
|
||||
tokio = { version = "1.53.1", features = ["rt", "rt-multi-thread", "macros"] }
|
||||
hex = "0.4.3"
|
||||
zstd = "0.13.3"
|
||||
|
||||
@@ -26,3 +26,8 @@ criterion = "0.8.2"
|
||||
[[bench]]
|
||||
name = "split_bench" # Имя файла в benches/ без расширения
|
||||
harness = false # Отключаем стандартный тестовый раннер
|
||||
|
||||
#[profile.release]
|
||||
#codegen-units = 1
|
||||
#lto = true
|
||||
#opt-level = 3
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#![windows_subsystem = "windows"]
|
||||
//#![windows_subsystem = "windows"]
|
||||
mod data_provider;
|
||||
mod dictionary;
|
||||
mod dictionary_test;
|
||||
|
||||
+9
-2
@@ -24,6 +24,7 @@ use iced::keyboard::Event;
|
||||
use iced::{Element, Task};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::Instant;
|
||||
|
||||
impl Default for ScreenState {
|
||||
fn default() -> Self {
|
||||
@@ -111,6 +112,7 @@ impl ScreenState {
|
||||
}
|
||||
|
||||
pub fn update(&mut self, message: RootMessage) -> Task<RootMessage> {
|
||||
let time = Instant::now();
|
||||
if let Keyboard(e) = message {
|
||||
return self.handle_keyboard(e);
|
||||
}
|
||||
@@ -139,6 +141,7 @@ impl ScreenState {
|
||||
RepetitionSettings
|
||||
);
|
||||
}
|
||||
println!("Update took {:?}", time.elapsed());
|
||||
|
||||
task.0
|
||||
}
|
||||
@@ -163,7 +166,8 @@ impl ScreenState {
|
||||
}
|
||||
|
||||
pub fn view(&self) -> Element<'_, RootMessage> {
|
||||
view_navigation!(
|
||||
let time = Instant::now();
|
||||
let view = view_navigation!(
|
||||
self.stack,
|
||||
Quiz,
|
||||
Selector,
|
||||
@@ -177,7 +181,10 @@ impl ScreenState {
|
||||
Sync,
|
||||
History,
|
||||
RepetitionSettings
|
||||
)
|
||||
);
|
||||
|
||||
println!("View took {:?}", time.elapsed());
|
||||
view
|
||||
}
|
||||
|
||||
fn handle_keyboard(&mut self, message: Event) -> Task<RootMessage> {
|
||||
|
||||
Reference in New Issue
Block a user