Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0

Configure Feed

Select the types of activity you want to include in your feed.

fjall: don't compress data

use more io and disk space to save a bit of cpu

i had the miniz flag enabled, but the partition create options were default, so i think it was maybe only lz4 before? hopefully this still makes an impact.

+7 -4
-1
Cargo.lock
··· 2039 2039 "guardian", 2040 2040 "interval-heap", 2041 2041 "log", 2042 - "miniz_oxide", 2043 2042 "path-absolutize", 2044 2043 "quick_cache", 2045 2044 "rustc-hash 2.1.1",
+1 -1
ufos/Cargo.toml
··· 9 9 clap = { version = "4.5.31", features = ["derive"] } 10 10 dropshot = "0.16.0" 11 11 env_logger = "0.11.7" 12 - fjall = { version = "2.6.7", features = ["miniz", "bytes", "single_writer_tx"], default-features = false } 12 + fjall = { version = "2.6.7", features = ["bytes", "single_writer_tx"], default-features = false } 13 13 jetstream = { path = "../jetstream" } 14 14 log = "0.4.26" 15 15 schemars = "0.8.22"
+6 -2
ufos/src/store.rs
··· 5 5 }; 6 6 use crate::{CollectionSamples, CreateRecord, DeleteAccount, EventBatch, ModifyRecord, Nsid}; 7 7 use fjall::{ 8 - Batch as FjallBatch, Config, Keyspace, PartitionCreateOptions, PartitionHandle, Slice, 8 + Batch as FjallBatch, CompressionType, Config, Keyspace, PartitionCreateOptions, 9 + PartitionHandle, Slice, 9 10 }; 10 11 use jetstream::events::Cursor; 11 12 use std::collections::HashMap; ··· 53 54 // TODO: make this async? or should the caller remember that storage is sync? 54 55 let keyspace = Config::new(path).fsync_ms(Some(4_000)).open()?; 55 56 56 - let partition = keyspace.open_partition("default", PartitionCreateOptions::default())?; 57 + let partition = keyspace.open_partition( 58 + "default", 59 + PartitionCreateOptions::default().compression(CompressionType::None), 60 + )?; 57 61 58 62 let js_cursor = partition.get("js_cursor")?.map(cursor_from_slice); 59 63