Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making use of scrollback fetches in the Combined Feed view #29841

Open
timabbott opened this issue Apr 25, 2024 · 1 comment
Open

Consider making use of scrollback fetches in the Combined Feed view #29841

timabbott opened this issue Apr 25, 2024 · 1 comment
Labels
area: message feed (scrolling) Scroll behavior, performance, and side-effects (marking as read) difficult Issues which we expect to be quite difficult

Comments

@timabbott
Copy link
Sponsor Member

In #29740, we remove a bit of optimization that Zulip previously did, which is that if you sit in the "Combined feed" view and scroll up, it'll extend the set of messages we have cached in all_messages_data for use in visiting other views efficiently.... which would make sense as the API query would be exactly the same one that the "Recent conversations" fetch more button does.

See https://github.com/zulip/zulip/pull/29740/files#r1566592303 for details.

I like the implementation simplicity benefits of these changes, so I don't want to go back to having all_messages_data deeply entangled throughout that code path. But I wonder a bit if there's a way that we could restore such an optimization more nicely, with a bit of careful checking of fetched message ranges -- maybe even something as simple as "If a GET /messages API request returns for the combined feed, and the query parameters have the anchor/etc. matching what we would do for an all_messages_data query, then do that."

I guess the other approach would be to implement #16697, which would allow all_messages_data to be used as the MessageListData for the combined feed view directly... I would guess that's probably nicer.

@timabbott timabbott added difficult Issues which we expect to be quite difficult area: message feed (scrolling) Scroll behavior, performance, and side-effects (marking as read) labels Apr 25, 2024
@amanagr
Copy link
Member

amanagr commented Apr 27, 2024

I guess the other approach would be to implement #16697, which would allow all_messages_data to be used as the MessageListData for the combined feed view directly... I would guess that's probably nicer.

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: message feed (scrolling) Scroll behavior, performance, and side-effects (marking as read) difficult Issues which we expect to be quite difficult
Projects
None yet
Development

No branches or pull requests

2 participants