mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: Add a config option to change the max TL size for legacy sync
This commit is contained in:
@@ -1196,6 +1196,13 @@
|
|||||||
#
|
#
|
||||||
#typing_client_timeout_max_s = 45
|
#typing_client_timeout_max_s = 45
|
||||||
|
|
||||||
|
# The maximum number of events to send at once for non-limited legacy syncs.
|
||||||
|
# Has no effect on sliding sync. This parameter also affects how many messages from each room
|
||||||
|
# are sent to the client on initial syncs, and larger values will make initial syncs slower.
|
||||||
|
# The default of 10 is reasonable for most use cases.
|
||||||
|
#
|
||||||
|
#incremental_sync_max_timeline_size = 10
|
||||||
|
|
||||||
# Set this to true for continuwuity to compress HTTP response bodies using
|
# Set this to true for continuwuity to compress HTTP response bodies using
|
||||||
# zstd. This option does nothing if continuwuity was not built with
|
# zstd. This option does nothing if continuwuity was not built with
|
||||||
# `zstd_compression` feature. Please be aware that enabling HTTP
|
# `zstd_compression` feature. Please be aware that enabling HTTP
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ pub(super) async fn load_joined_room(
|
|||||||
room_id,
|
room_id,
|
||||||
previous_sync_end_count,
|
previous_sync_end_count,
|
||||||
Some(next_batchcount),
|
Some(next_batchcount),
|
||||||
10_usize,
|
services.config.incremental_sync_max_timeline_size,
|
||||||
);
|
);
|
||||||
|
|
||||||
let receipt_events = services
|
let receipt_events = services
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ pub(super) async fn load_left_room(
|
|||||||
room_id,
|
room_id,
|
||||||
Some(timeline_start_count),
|
Some(timeline_start_count),
|
||||||
Some(timeline_end_count),
|
Some(timeline_end_count),
|
||||||
10_usize,
|
services.config.incremental_sync_max_timeline_size,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
@@ -1384,6 +1384,16 @@ pub struct Config {
|
|||||||
#[serde(default = "default_typing_client_timeout_max_s")]
|
#[serde(default = "default_typing_client_timeout_max_s")]
|
||||||
pub typing_client_timeout_max_s: u64,
|
pub typing_client_timeout_max_s: u64,
|
||||||
|
|
||||||
|
/// The maximum number of events to send at once for non-limited legacy
|
||||||
|
/// syncs. Has no effect on sliding sync. This parameter also affects how
|
||||||
|
/// many messages from each room are sent to the client on initial syncs;
|
||||||
|
/// larger values will make initial syncs slower. The default of 10 is
|
||||||
|
/// reasonable for most use cases.
|
||||||
|
///
|
||||||
|
/// default: 10
|
||||||
|
#[serde(default = "default_incremental_sync_max_timeline_size")]
|
||||||
|
pub incremental_sync_max_timeline_size: usize,
|
||||||
|
|
||||||
/// Set this to true for continuwuity to compress HTTP response bodies using
|
/// Set this to true for continuwuity to compress HTTP response bodies using
|
||||||
/// zstd. This option does nothing if continuwuity was not built with
|
/// zstd. This option does nothing if continuwuity was not built with
|
||||||
/// `zstd_compression` feature. Please be aware that enabling HTTP
|
/// `zstd_compression` feature. Please be aware that enabling HTTP
|
||||||
@@ -2449,6 +2459,8 @@ fn default_typing_client_timeout_min_s() -> u64 { 15 }
|
|||||||
|
|
||||||
fn default_typing_client_timeout_max_s() -> u64 { 45 }
|
fn default_typing_client_timeout_max_s() -> u64 { 45 }
|
||||||
|
|
||||||
|
fn default_incremental_sync_max_timeline_size() -> usize { 10 }
|
||||||
|
|
||||||
fn default_rocksdb_recovery_mode() -> u8 { 1 }
|
fn default_rocksdb_recovery_mode() -> u8 { 1 }
|
||||||
|
|
||||||
fn default_rocksdb_log_level() -> String { "error".to_owned() }
|
fn default_rocksdb_log_level() -> String { "error".to_owned() }
|
||||||
|
|||||||
Reference in New Issue
Block a user