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

Reduce fetchLimit (40 -> 20) #1638

Merged
merged 3 commits into from Jun 27, 2023
Merged

Conversation

sunaurus
Copy link
Collaborator

@sunaurus sunaurus commented Jun 27, 2023

This PR proposes reducing the default page size. It's certainly a change with some trade-offs, so feel free to reject it (or debate the extent of the reduction), but I will provide my argument below:

On lemm.ee, I have noticed that this small tweak has vastly improved the experience for our users. By reducing the page size in half, our page loads significantly faster, and server load has in general decreased slightly as well.

I will also share some actual stats. This was with fetchLimit set to 40:
image

And this is the same test run with fetchLimit reduced to 20:
image

Of course, the downside with this is that users need to load additional pages more often, but it seems like a small price to pay considering the performance benefits.

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this. I know the solution to optimize our post_view queries now, but that might be a week or two yet till I can add it.

@SleeplessOne1917
Copy link
Member

This seems like a good short term solution. I think part of the problem is also that postviews are very big blobs of json, so even fetching a few is going to mean a big response from the API.

@dessalines dessalines enabled auto-merge (squash) June 27, 2023 13:03
@dessalines dessalines merged commit 934cabc into LemmyNet:main Jun 27, 2023
1 check passed
@sunaurus sunaurus deleted the reduce_fetch_limit branch June 27, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants