commit 48f55ef2113ebc2a44badf210e4b8151315678a3
parent 1ad7a92be2846c011d083e70ac2c0d3b9c0df94e
Author: alltheseas <alltheseas@users.noreply.github.com>
Date: Thu, 23 Oct 2025 18:08:26 -0500
Remove unused profile image cache plumbing
Diffstat:
3 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -1919,7 +1919,6 @@ dependencies = [
"hyper 1.7.0",
"hyper-util",
"image",
- "lru",
"metrics 0.21.1",
"metrics-exporter-prometheus",
"nostr",
diff --git a/Cargo.toml b/Cargo.toml
@@ -26,7 +26,6 @@ egui_skia = { git = "https://github.com/jb55/egui_skia.git", rev = "6205d63e751d
#egui_skia = { path = "/home/jb55/dev/github/lucasmerlin/egui_skia", features = ["cpu_fix"] }
skia-safe = "0.58.0"
image = "0.24.7"
-lru = "0.12.1"
bytes = "1.5.0"
http = "1.0.0"
html-escape = "0.2.13"
diff --git a/src/main.rs b/src/main.rs
@@ -20,8 +20,6 @@ use nostr_sdk::prelude::*;
use nostrdb::{Config, Ndb, NoteKey, Transaction};
use std::time::Duration;
-use lru::LruCache;
-
mod abbrev;
mod error;
mod fonts;
@@ -32,11 +30,8 @@ mod pfp;
mod relay_pool;
mod render;
-use crate::secp256k1::XOnlyPublicKey;
use relay_pool::RelayPool;
-type ImageCache = LruCache<XOnlyPublicKey, egui::TextureHandle>;
-
const FRONTEND_CSS: &str = include_str!("../assets/damus.css");
const POETSEN_FONT: &[u8] = include_bytes!("../fonts/PoetsenOne-Regular.ttf");
const DEFAULT_PFP_IMAGE: &[u8] = include_bytes!("../assets/default_pfp.jpg");
@@ -48,7 +43,6 @@ pub struct Notecrumbs {
_keys: Keys,
relay_pool: Arc<RelayPool>,
font_data: egui::FontData,
- _img_cache: Arc<ImageCache>,
default_pfp: egui::ImageData,
background: egui::ImageData,
prometheus_handle: PrometheusHandle,
@@ -297,7 +291,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.await?,
);
spawn_relay_pool_metrics_logger(relay_pool.clone());
- let img_cache = Arc::new(LruCache::new(std::num::NonZeroUsize::new(64).unwrap()));
let default_pfp = egui::ImageData::Color(Arc::new(get_default_pfp()));
let background = egui::ImageData::Color(Arc::new(get_gradient()));
let font_data = egui::FontData::from_static(include_bytes!("../fonts/NotoSans-Regular.ttf"));
@@ -307,7 +300,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
_keys: keys,
relay_pool,
_timeout: timeout,
- _img_cache: img_cache,
background,
font_data,
default_pfp,