Skip to content
Snippets Groups Projects

Optimize chat perf in long run

Merged Shpuld Shpludson requested to merge feat/keep-chat-perf-up into develop
1 unresolved thread

Previously the chat view would bloat and bloat over time. Added simple cutting to reduce visible chat messages to the newest 50 when you scroll all the way to the bottom, kinda like loading new on timelines cuts the older stuff out.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
241 241 this.fetchChat({ maxId: this.currentChatMessageService.minId })
242 242 } else if (this.bottomedOut(JUMP_TO_BOTTOM_BUTTON_VISIBILITY_OFFSET)) {
243 243 this.jumpToBottomButtonVisible = false
244 this.$store.dispatch('cullOlderMessages', this.currentChatMessageService.chatId)
  • Maintainer

    i would prefer to have some sort of timeout before it takes place, so that if you're jumping between "now" and "then" often it won't cull everything immediately

  • there's not even a good way to do go back and forth in the UI. it's really a use-case that can't be handled very well and I don't know if should be considered. Simplest alternative is having the culling happen when new messages are added and you're scrolled to the bottom, but that also breaks the use-case of going back and forth between checking old messages and looking at and replying to recent ones (which seems like the likely use for going back and forth)

  • Maintainer

    easiest way I can think of to go back and forth is using ctrl-f to search above and end key.

    I'm pretty much bringing this usecase up because it's very annoying in skype trying to find some very old message, forward/copy-paste it, have screen scroll down and cull older messages and then having to scroll all the way back again.

    Maybe it's not a problem at all, and just don't jump to bottom on new messages including user's posting if scroll is beyond certain limit

  • changed this line in version 2 of the diff

  • it now does it if you're still bottomed after 5 second check. so quick stops to bottom don't trigger it instantly.

  • Please register or sign in to reply
  • added 1 commit

    • 67f3532a - add additional check with timeout

    Compare with previous version

  • HJ approved this merge request

    approved this merge request

  • mentioned in commit 589ab651

  • Please register or sign in to reply
    Loading