fix profiler
I updated puffin to egui v0.29.1 and now it works Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
105
Cargo.lock
generated
105
Cargo.lock
generated
@@ -1095,12 +1095,6 @@ version = "0.1.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
|
checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ecolor"
|
|
||||||
version = "0.27.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "20930a432bbd57a6d55e07976089708d4893f3d556cf42a0d79e9e321fa73b10"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ecolor"
|
name = "ecolor"
|
||||||
version = "0.29.1"
|
version = "0.29.1"
|
||||||
@@ -1108,7 +1102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "775cfde491852059e386c4e1deb4aef381c617dc364184c6f6afee99b87c402b"
|
checksum = "775cfde491852059e386c4e1deb4aef381c617dc364184c6f6afee99b87c402b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"emath 0.29.1",
|
"emath",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1121,7 +1115,7 @@ dependencies = [
|
|||||||
"ahash",
|
"ahash",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"document-features",
|
"document-features",
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"egui-wgpu",
|
"egui-wgpu",
|
||||||
"egui-winit",
|
"egui-winit",
|
||||||
"egui_glow",
|
"egui_glow",
|
||||||
@@ -1134,7 +1128,7 @@ dependencies = [
|
|||||||
"parking_lot",
|
"parking_lot",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pollster",
|
"pollster",
|
||||||
"puffin",
|
"puffin 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"raw-window-handle 0.6.2",
|
"raw-window-handle 0.6.2",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
@@ -1147,17 +1141,6 @@ dependencies = [
|
|||||||
"winit 0.30.5",
|
"winit 0.30.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "egui"
|
|
||||||
version = "0.27.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "584c5d1bf9a67b25778a3323af222dbe1a1feb532190e103901187f92c7fe29a"
|
|
||||||
dependencies = [
|
|
||||||
"ahash",
|
|
||||||
"epaint 0.27.2",
|
|
||||||
"nohash-hasher",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "egui"
|
name = "egui"
|
||||||
version = "0.29.1"
|
version = "0.29.1"
|
||||||
@@ -1167,11 +1150,11 @@ dependencies = [
|
|||||||
"accesskit",
|
"accesskit",
|
||||||
"ahash",
|
"ahash",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"emath 0.29.1",
|
"emath",
|
||||||
"epaint 0.29.1",
|
"epaint",
|
||||||
"log",
|
"log",
|
||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
"puffin",
|
"puffin 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1184,10 +1167,10 @@ dependencies = [
|
|||||||
"ahash",
|
"ahash",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"document-features",
|
"document-features",
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"epaint 0.29.1",
|
"epaint",
|
||||||
"log",
|
"log",
|
||||||
"puffin",
|
"puffin 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"thiserror 1.0.63",
|
"thiserror 1.0.63",
|
||||||
"type-map",
|
"type-map",
|
||||||
"web-time 1.1.0",
|
"web-time 1.1.0",
|
||||||
@@ -1203,9 +1186,9 @@ checksum = "0a9c430f4f816340e8e8c1b20eec274186b1be6bc4c7dfc467ed50d57abc36c6"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"arboard",
|
"arboard",
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"log",
|
"log",
|
||||||
"puffin",
|
"puffin 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"raw-window-handle 0.6.2",
|
"raw-window-handle 0.6.2",
|
||||||
"smithay-clipboard",
|
"smithay-clipboard",
|
||||||
"web-time 1.1.0",
|
"web-time 1.1.0",
|
||||||
@@ -1220,13 +1203,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "bf3c1f5cd8dfe2ade470a218696c66cf556fcfd701e7830fa2e9f4428292a2a1"
|
checksum = "bf3c1f5cd8dfe2ade470a218696c66cf556fcfd701e7830fa2e9f4428292a2a1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"ehttp 0.5.0",
|
"ehttp 0.5.0",
|
||||||
"enum-map",
|
"enum-map",
|
||||||
"image",
|
"image",
|
||||||
"log",
|
"log",
|
||||||
"mime_guess2",
|
"mime_guess2",
|
||||||
"resvg",
|
"resvg",
|
||||||
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1237,12 +1221,12 @@ checksum = "0e39bccc683cd43adab530d8f21a13eb91e80de10bcc38c3f1c16601b6f62b26"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"egui-winit",
|
"egui-winit",
|
||||||
"glow 0.14.2",
|
"glow 0.14.2",
|
||||||
"log",
|
"log",
|
||||||
"memoffset",
|
"memoffset",
|
||||||
"puffin",
|
"puffin 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
"winit 0.30.5",
|
"winit 0.30.5",
|
||||||
@@ -1254,7 +1238,7 @@ version = "0.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cca758d7454588a5d927fd4fcb71cbb1ad21bcda251acd7860b04d91f83bcc4c"
|
checksum = "cca758d7454588a5d927fd4fcb71cbb1ad21bcda251acd7860b04d91f83bcc4c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"egui_extras",
|
"egui_extras",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1264,7 +1248,7 @@ version = "0.2.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8ff9e00113ffe8f10d36302c383f2c0ad01ec388479a30851bfda5bcc446a840"
|
checksum = "8ff9e00113ffe8f10d36302c383f2c0ad01ec388479a30851bfda5bcc446a840"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"egui_extras",
|
"egui_extras",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1274,7 +1258,7 @@ version = "0.5.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8191e9cbf6cc7b111655fc115725505fc09d7698c04c36897950c46d6e69521b"
|
checksum = "8191e9cbf6cc7b111655fc115725505fc09d7698c04c36897950c46d6e69521b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"web-time 1.1.0",
|
"web-time 1.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1311,12 +1295,6 @@ version = "1.13.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "emath"
|
|
||||||
version = "0.27.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e4c3a552cfca14630702449d35f41c84a0d15963273771c6059175a803620f3f"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "emath"
|
name = "emath"
|
||||||
version = "0.29.1"
|
version = "0.29.1"
|
||||||
@@ -1411,20 +1389,6 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "epaint"
|
|
||||||
version = "0.27.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b381f8b149657a4acf837095351839f32cd5c4aec1817fc4df84e18d76334176"
|
|
||||||
dependencies = [
|
|
||||||
"ab_glyph",
|
|
||||||
"ahash",
|
|
||||||
"ecolor 0.27.2",
|
|
||||||
"emath 0.27.2",
|
|
||||||
"nohash-hasher",
|
|
||||||
"parking_lot",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "epaint"
|
name = "epaint"
|
||||||
version = "0.29.1"
|
version = "0.29.1"
|
||||||
@@ -1434,13 +1398,13 @@ dependencies = [
|
|||||||
"ab_glyph",
|
"ab_glyph",
|
||||||
"ahash",
|
"ahash",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"ecolor 0.29.1",
|
"ecolor",
|
||||||
"emath 0.29.1",
|
"emath",
|
||||||
"epaint_default_fonts",
|
"epaint_default_fonts",
|
||||||
"log",
|
"log",
|
||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"puffin",
|
"puffin 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2725,7 +2689,7 @@ dependencies = [
|
|||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
"dirs",
|
"dirs",
|
||||||
"eframe",
|
"eframe",
|
||||||
"egui 0.29.1",
|
"egui",
|
||||||
"egui_extras",
|
"egui_extras",
|
||||||
"egui_nav",
|
"egui_nav",
|
||||||
"egui_tabs",
|
"egui_tabs",
|
||||||
@@ -2740,7 +2704,7 @@ dependencies = [
|
|||||||
"nostrdb",
|
"nostrdb",
|
||||||
"open",
|
"open",
|
||||||
"poll-promise",
|
"poll-promise",
|
||||||
"puffin",
|
"puffin 0.19.1 (git+https://github.com/jb55/puffin?rev=70ff86d5503815219b01a009afd3669b7903a057)",
|
||||||
"puffin_egui",
|
"puffin_egui",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"security-framework",
|
"security-framework",
|
||||||
@@ -3423,6 +3387,19 @@ name = "puffin"
|
|||||||
version = "0.19.1"
|
version = "0.19.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fa9dae7b05c02ec1a6bc9bcf20d8bc64a7dcbf57934107902a872014899b741f"
|
checksum = "fa9dae7b05c02ec1a6bc9bcf20d8bc64a7dcbf57934107902a872014899b741f"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"byteorder",
|
||||||
|
"cfg-if",
|
||||||
|
"itertools 0.10.5",
|
||||||
|
"once_cell",
|
||||||
|
"parking_lot",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "puffin"
|
||||||
|
version = "0.19.1"
|
||||||
|
source = "git+https://github.com/jb55/puffin?rev=70ff86d5503815219b01a009afd3669b7903a057#70ff86d5503815219b01a009afd3669b7903a057"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
@@ -3437,16 +3414,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "puffin_egui"
|
name = "puffin_egui"
|
||||||
version = "0.27.1"
|
version = "0.29.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://github.com/jb55/puffin?rev=70ff86d5503815219b01a009afd3669b7903a057#70ff86d5503815219b01a009afd3669b7903a057"
|
||||||
checksum = "0bf67bdfe1838de5d81df11eb5d3bce78ae9cb7c2c8e172c3a3d768ae61a404a"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"egui 0.27.2",
|
"egui",
|
||||||
|
"egui_extras",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"natord",
|
"natord",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"puffin",
|
"puffin 0.19.1 (git+https://github.com/jb55/puffin?rev=70ff86d5503815219b01a009afd3669b7903a057)",
|
||||||
"time",
|
"time",
|
||||||
"vec1",
|
"vec1",
|
||||||
"web-time 0.2.4",
|
"web-time 0.2.4",
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ nostrdb = { workspace = true }
|
|||||||
enostr = { path = "enostr" }
|
enostr = { path = "enostr" }
|
||||||
serde_json = "1.0.89"
|
serde_json = "1.0.89"
|
||||||
env_logger = "0.10.0"
|
env_logger = "0.10.0"
|
||||||
puffin_egui = { version = "0.27.0", optional = true }
|
puffin_egui = { git = "https://github.com/jb55/puffin", package = "puffin_egui", rev = "70ff86d5503815219b01a009afd3669b7903a057", optional = true }
|
||||||
puffin = { version = "0.19.0", optional = true }
|
puffin = { git = "https://github.com/jb55/puffin", package = "puffin", rev = "70ff86d5503815219b01a009afd3669b7903a057", optional = true }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
base32 = "0.4.0"
|
base32 = "0.4.0"
|
||||||
strum = "0.26"
|
strum = "0.26"
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ impl NoteContextButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn show(ui: &mut egui::Ui, note_key: NoteKey, put_at: Rect) -> egui::Response {
|
pub fn show(ui: &mut egui::Ui, note_key: NoteKey, put_at: Rect) -> egui::Response {
|
||||||
|
#[cfg(feature = "profiling")]
|
||||||
|
puffin::profile_function!();
|
||||||
|
|
||||||
let id = ui.id().with(("more_options_anim", note_key));
|
let id = ui.id().with(("more_options_anim", note_key));
|
||||||
|
|
||||||
let min_radius = Self::min_radius();
|
let min_radius = Self::min_radius();
|
||||||
@@ -140,6 +143,9 @@ impl NoteContextButton {
|
|||||||
ui: &mut egui::Ui,
|
ui: &mut egui::Ui,
|
||||||
button_response: egui::Response,
|
button_response: egui::Response,
|
||||||
) -> Option<NoteContextSelection> {
|
) -> Option<NoteContextSelection> {
|
||||||
|
#[cfg(feature = "profiling")]
|
||||||
|
puffin::profile_function!();
|
||||||
|
|
||||||
let mut context_selection: Option<NoteContextSelection> = None;
|
let mut context_selection: Option<NoteContextSelection> = None;
|
||||||
|
|
||||||
stationary_arbitrary_menu_button(ui, button_response, |ui| {
|
stationary_arbitrary_menu_button(ui, button_response, |ui| {
|
||||||
|
|||||||
@@ -413,6 +413,9 @@ impl<'a> NoteView<'a> {
|
|||||||
options: NoteOptions,
|
options: NoteOptions,
|
||||||
container_right: Pos2,
|
container_right: Pos2,
|
||||||
) -> NoteResponse {
|
) -> NoteResponse {
|
||||||
|
#[cfg(feature = "profiling")]
|
||||||
|
puffin::profile_function!();
|
||||||
|
|
||||||
let note_key = note.key().unwrap();
|
let note_key = note.key().unwrap();
|
||||||
|
|
||||||
let inner_response = ui.horizontal(|ui| {
|
let inner_response = ui.horizontal(|ui| {
|
||||||
@@ -669,6 +672,9 @@ fn render_note_actionbar(
|
|||||||
note_id: &[u8; 32],
|
note_id: &[u8; 32],
|
||||||
note_key: NoteKey,
|
note_key: NoteKey,
|
||||||
) -> egui::InnerResponse<Option<NoteAction>> {
|
) -> egui::InnerResponse<Option<NoteAction>> {
|
||||||
|
#[cfg(feature = "profiling")]
|
||||||
|
puffin::profile_function!();
|
||||||
|
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
let reply_resp = reply_button(ui, note_key);
|
let reply_resp = reply_button(ui, note_key);
|
||||||
let quote_resp = quote_repost_button(ui, note_key);
|
let quote_resp = quote_repost_button(ui, note_key);
|
||||||
|
|||||||
@@ -275,8 +275,10 @@ pub fn get_unknown_note_ids<'a>(
|
|||||||
note: &Note<'a>,
|
note: &Note<'a>,
|
||||||
ids: &mut HashSet<UnknownId>,
|
ids: &mut HashSet<UnknownId>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
// the author pubkey
|
#[cfg(feature = "profiling")]
|
||||||
|
puffin::profile_function!();
|
||||||
|
|
||||||
|
// the author pubkey
|
||||||
if ndb.get_profile_by_pubkey(txn, note.pubkey()).is_err() {
|
if ndb.get_profile_by_pubkey(txn, note.pubkey()).is_err() {
|
||||||
ids.insert(UnknownId::Pubkey(Pubkey::new(*note.pubkey())));
|
ids.insert(UnknownId::Pubkey(Pubkey::new(*note.pubkey())));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user