Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Download full chat history after joining room #15506

Closed
Aquathing opened this issue Apr 30, 2023 · 3 comments
Closed

Download full chat history after joining room #15506

Aquathing opened this issue Apr 30, 2023 · 3 comments
Labels
A-Federation T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@Aquathing
Copy link

Description:

When joining a room (whether it's big or small) it is common to be interested in conversations that happened before. Currently, the server will only fetch the history of the room when the user scrolls the chat, but this has two main disadvantages:

  • It becomes frustrating, especially in big rooms, to scroll the chat and get stuck with the app loading.
  • Search results are incomplete, which means it will be harder (if not impossible!) to find what I'm looking for.

I think it would be help a lot if the server downloaded the chat history in the background, so that it will eventually be able to provide fast and complete results.

@clokep
Copy link
Member

clokep commented May 1, 2023

Do you envision this as a change in behavior, a configuration option or something else? Maybe an admin API for a per room basis?

I suspect the downside of this is that joining a long lived room could cause a massive amount of data to be pulled (causing large bandwidth and storage increases).

@Aquathing
Copy link
Author

I agree on the concern about the massive amount of data. I believe this shouldn't be an opt-in behavior though, especially not on a per-room basis. As a user, I'd rather not have to ask my homeserver admin to download the room for me, it should simply work.

I think it would make sense to have a configuration option called 'download_history' which defaults to true, so that server admins can completely disable this behavior if they wish to keep their server as lightweight as possible.

And to limit the amount of resource usage, I would use a configuration option that limits the amount of events downloaded for each room. Something like 'max_backwards_events' would make sense to me. The downside of this, is that it only pushes back a bit the points I've stated before.

Sure, it will be easier to scroll the chat, but once the max_backwards_events limit is reached, the user will have the same problem. I'm not sure how things work now, but perhaps the server could request a bit more events than what the client is asking for, so that it will feel smoother in big rooms when scrolling fast (perhaps, even by increasing the amount of request events to match the user's speed).

As for search, I don't see any way out, if we limit the amount of events we are also inevitably limiting the amount of search results, but as long as the limit is high enough, it will be less noticeable and definitely better than how it is now.

@squahtx squahtx added the T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. label May 3, 2023
@MadLittleMods
Copy link
Contributor

Duplicate of #13576 (please move your 👍 over there)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Federation T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

4 participants