this post was submitted on 06 Aug 2023
4 points (70.0% liked)

Nemmy

141 readers
1 users here now

Nemmy: The Neat Lemmy App for the Web

This project is focused on building an App with the best possible User Experience.

Nemmy Early Access Website

Nemmy on Google Play

Nemmy on GitHub

founded 1 year ago
MODERATORS
 

About

I have an idea to make loading almost everything very fast but it comes at the cost of having to load everything double.

Voting:

Use twice as much data but be much faster: upvote

Only load everything once but be just as fast as every other lemmy app out there: downvote

I recommend viewing this post on Nemmy since it has a poll feature (WIP)

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago

I vote Yes, but also preferably an opt out/settings to reduce data usage.

[–] [email protected] 1 points 1 year ago (1 children)

Wouldn't loading it twice make it slower, then just loading once?

[–] [email protected] 1 points 1 year ago

No, actually. Sorry I should've explained more in the post.

The plan is to always send 2 requests, one with user details (to get upvotes, read posts, bookmarks etc) and the other without any personal data.

The one with a JWT attached to the requests can't be server-side cached, since that would be a security risk.

The one without any personal data can however be cached.

So when I first do a server render of any page, almost all content will be cached and served instantly. Then I do a client side fetch of the same data, filling in user data such as bookmarked posts for example.

Effectively, this will make the time until you see posts and stuff much faster.