Rollback api address and remove mimalloc

This commit is contained in:
2026-08-13 11:56:25 +03:00
parent a21fd5e69b
commit a5bcfe0b1d
5 changed files with 20 additions and 38 deletions
Generated
-19
View File
@@ -2216,7 +2216,6 @@ dependencies = [
"hex",
"iced",
"iced_core",
"mimalloc",
"rand",
"reqwest",
"rhai",
@@ -2392,15 +2391,6 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
[[package]]
name = "libmimalloc-sys"
version = "0.1.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
dependencies = [
"cc",
]
[[package]]
name = "libredox"
version = "0.1.12"
@@ -2546,15 +2536,6 @@ dependencies = [
"paste",
]
[[package]]
name = "mimalloc"
version = "0.1.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
dependencies = [
"libmimalloc-sys",
]
[[package]]
name = "mime"
version = "0.3.17"
+6 -5
View File
@@ -19,7 +19,7 @@ sha2 = "0.11.0"
tokio = { version = "1.53.1", features = ["rt", "rt-multi-thread", "macros"] }
hex = "0.4.3"
zstd = "0.13.3"
mimalloc = "0.1.52"
#mimalloc = "0.1.52"
[dev-dependencies]
criterion = "0.8.2"
@@ -28,7 +28,8 @@ criterion = "0.8.2"
name = "split_bench" # Имя файла в benches/ без расширения
harness = false # Отключаем стандартный тестовый раннер
#[profile.release]
#codegen-units = 1
#lto = true
#opt-level = 3
[profile.super-release]
inherits = "release"
codegen-units = 1
lto = true
opt-level = 3
+4 -4
View File
@@ -1,11 +1,11 @@
use crate::dictionary::app_data_dir;
use std::io;
use tokio::fs::{File, OpenOptions};
use tokio::io::{AsyncReadExt, AsyncWriteExt, BufReader};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use zstd::{Decoder, Encoder, DEFAULT_COMPRESSION_LEVEL};
use crate::dictionary::app_data_dir;
const API_URL: &str = "http://127.0.0.1:8089/";
// const API_URL: &str = "https://learning.micialware.ru/";
// const API_URL: &str = "http://127.0.0.1:8089/";
const API_URL: &str = "https://learning.micialware.ru/";
pub async fn send_data(id: String) {
let path = app_data_dir();
+8 -9
View File
@@ -16,27 +16,26 @@ mod word;
mod writing;
mod repetition_settings;
use std::collections::HashMap;
use chrono::{ NaiveDate};
use crate::data_provider::card_sets::load_sets;
use crate::data_provider::settings::get_setting;
use crate::data_provider::sqlite::default_connection;
use crate::data_provider::words::{load_word_groups, load_words};
use crate::dictionary::app_data_dir;
use crate::lang::{WordData, WordGroup};
use crate::navigation::{AppSettings, RootMessage, ScreenState};
use crate::quiz::*;
use crate::repetitions::CardSetSettings;
use crate::RootMessage::Keyboard;
use iced::{window, Font};
use chrono::NaiveDate;
use iced::{keyboard, Subscription, Theme};
use iced_core::Size;
use iced::{window, Font};
use iced_core::window::Position;
use iced_core::Size;
// use mimalloc::MiMalloc;
use rusqlite::Connection;
use mimalloc::MiMalloc;
use crate::data_provider::sqlite::default_connection;
use std::collections::HashMap;
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;
// #[global_allocator]
// static GLOBAL: MiMalloc = MiMalloc;
const USER_FONT: Font = Font::with_name("Noto Sans JP");
fn main() -> iced::Result {
+2 -1
View File
@@ -144,8 +144,9 @@ impl SyncState {
DisableSync => {
let mut state = self.state.lock().unwrap();
state.sync_data.key = None;
delete_settings("SYNC_KEY".to_string(), &state.connection);
delete_settings("AUTO_WEB_FETCH".to_string(), &state.connection);
}
SwitchAutoSync => {
self.auto_fetch = !self.auto_fetch;