Skip to content

Commit

Permalink
refactor: add perf logging to jumpToMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
WofWca committed Sep 24, 2024
1 parent 4017028 commit ef48a37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/frontend/src/stores/messagelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ class MessageListStore extends Store<MessageListState> {
highlight = true,
addMessageIdToStack?: undefined | number
) => {
const startTime = performance.now()

this.log.debug('jumpToMessage with messageId: ', msgId)
const accountId = selectedAccountId()
// these methods were called in backend before
Expand Down Expand Up @@ -569,6 +571,7 @@ class MessageListStore extends Store<MessageListState> {
}
}

this.log.debug('jumpToMessage took', performance.now() - startTime)
// TODO perf: it could so happen that nothing except `viewState` (which
// is only responsible for scrolling)
// has changed after this function has run.
Expand Down

0 comments on commit ef48a37

Please sign in to comment.