perf: Phase 4+5 optimizations — uploads 10x, downloads 2x, concurrent 2x. moka cache, 512KB buffers, remove sync_all, hash-on-write, preloaded queries, bench.sh v3, gitignore storage/. 500MB upload 12.6s->1.3s (392MB/s). RSS 69-113MB, 0 swap.
This commit is contained in:
@@ -79,6 +79,7 @@ impl CalendarEvent {
|
||||
* @param ical_data Complete iCalendar data (VEVENT component)
|
||||
* @return Result containing the new CalendarEvent or a domain error
|
||||
*/
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
calendar_id: Uuid,
|
||||
summary: String,
|
||||
@@ -165,6 +166,7 @@ impl CalendarEvent {
|
||||
* @param updated_at Time when the event was last modified
|
||||
* @return Result containing the new CalendarEvent or a domain error
|
||||
*/
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn with_id(
|
||||
id: Uuid,
|
||||
calendar_id: Uuid,
|
||||
|
||||
@@ -35,7 +35,7 @@ impl AddressBook {
|
||||
}
|
||||
}
|
||||
|
||||
/// Reconstructs from persistence (no validation)
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn from_raw(
|
||||
id: Uuid,
|
||||
name: String,
|
||||
|
||||
@@ -127,7 +127,7 @@ impl File {
|
||||
})
|
||||
}
|
||||
|
||||
/// Creates a file with specific timestamps (for reconstruction)
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn with_timestamps(
|
||||
id: String,
|
||||
name: String,
|
||||
@@ -196,8 +196,7 @@ impl File {
|
||||
self.modified_at
|
||||
}
|
||||
|
||||
/// Creates a new File instance from a DTO
|
||||
/// This function is primarily for conversions in batch handlers
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn from_dto(
|
||||
id: String,
|
||||
name: String,
|
||||
|
||||
@@ -41,8 +41,7 @@ impl Session {
|
||||
}
|
||||
}
|
||||
|
||||
/// Reconstruct a Session from persisted data (e.g. database row).
|
||||
/// Skips ID generation — uses the provided values directly.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn from_raw(
|
||||
id: String,
|
||||
user_id: String,
|
||||
|
||||
@@ -84,8 +84,7 @@ impl Share {
|
||||
})
|
||||
}
|
||||
|
||||
/// Reconstruct a Share from persisted data (e.g. filesystem/database).
|
||||
/// Skips validation and ID generation — uses the provided values directly.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn from_raw(
|
||||
id: String,
|
||||
item_id: String,
|
||||
|
||||
@@ -41,8 +41,7 @@ impl TrashedItem {
|
||||
}
|
||||
}
|
||||
|
||||
/// Reconstruct a TrashedItem from persisted data (e.g. JSON index).
|
||||
/// Skips ID generation — uses the provided values directly.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn from_raw(
|
||||
id: Uuid,
|
||||
original_id: Uuid,
|
||||
|
||||
@@ -128,7 +128,7 @@ impl User {
|
||||
})
|
||||
}
|
||||
|
||||
// Create from existing values (for reconstruction from DB)
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn from_data(
|
||||
id: String,
|
||||
username: String,
|
||||
@@ -159,7 +159,7 @@ impl User {
|
||||
}
|
||||
}
|
||||
|
||||
/// Reconstruct from DB with OIDC fields
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn from_data_full(
|
||||
id: String,
|
||||
username: String,
|
||||
|
||||
Reference in New Issue
Block a user