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:
William Casarin
2024-12-07 19:53:32 -08:00
parent 323d1bcd2c
commit 720230ca55
5 changed files with 58 additions and 67 deletions

View File

@@ -99,6 +99,9 @@ impl NoteContextButton {
}
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 min_radius = Self::min_radius();
@@ -140,6 +143,9 @@ impl NoteContextButton {
ui: &mut egui::Ui,
button_response: egui::Response,
) -> Option<NoteContextSelection> {
#[cfg(feature = "profiling")]
puffin::profile_function!();
let mut context_selection: Option<NoteContextSelection> = None;
stationary_arbitrary_menu_button(ui, button_response, |ui| {

View File

@@ -413,6 +413,9 @@ impl<'a> NoteView<'a> {
options: NoteOptions,
container_right: Pos2,
) -> NoteResponse {
#[cfg(feature = "profiling")]
puffin::profile_function!();
let note_key = note.key().unwrap();
let inner_response = ui.horizontal(|ui| {
@@ -669,6 +672,9 @@ fn render_note_actionbar(
note_id: &[u8; 32],
note_key: NoteKey,
) -> egui::InnerResponse<Option<NoteAction>> {
#[cfg(feature = "profiling")]
puffin::profile_function!();
ui.horizontal(|ui| {
let reply_resp = reply_button(ui, note_key);
let quote_resp = quote_repost_button(ui, note_key);

View File

@@ -275,8 +275,10 @@ pub fn get_unknown_note_ids<'a>(
note: &Note<'a>,
ids: &mut HashSet<UnknownId>,
) -> Result<()> {
// the author pubkey
#[cfg(feature = "profiling")]
puffin::profile_function!();
// the author pubkey
if ndb.get_profile_by_pubkey(txn, note.pubkey()).is_err() {
ids.insert(UnknownId::Pubkey(Pubkey::new(*note.pubkey())));
}