206
submitted 8 months ago by kota@hexbear.net to c/technology@hexbear.net

My phone barely manages to load the site. Pages crash and when they do load it's around 10-15 seconds. Pretty much all newer js-dependant websites are like this for me. I simply don't use most newer websites on my phone. Maybe eventually I'll buy a new phone, but things work fine on my laptop so I mostly use that and having a phone from this decade is bourgeois decadence.

A while back I thought maybe I should take a crack at writing a fast and simple read-only frontend that I can use on my phone similar I guess to nitter, invidious, bibliogram, etc.

So I went ahead and did just that: https://diethex.net

Hilariously, I actually wound up doing this TWICE. The first time I finished it up last June and then the site migrated to lemmy v3 so I had to rewrite almost everything which I just now got around to this month. Here's the code in case anyone wants to read it: https://git.sr.ht/~kota/hex

When a page is requested all of its data (comments, posts, etc) are cached for the next 20 minutes which dramatically reduces requests to the actual website when you're browsing around. Also every page is statically generated from simple html templates on the server; so javascript isn't required. I wound up adding a tiiiny bit of optional js to allow opening and closing comments. So you can swipe to the left on a phone to close a comment.

If hexbear is already fast for you then there's no point in using this, but figured I'd say something in case there's anyone else with my issues.

you are viewing a single comment's thread
view the rest of the comments
[-] neo@hexbear.net 2 points 8 months ago

So I did a few comparisons. On ungoogled-chromium on my 2012 Macbook Air I disabled the loading of image assets. Just accessing the home pages with caches disabled took:

photon: 403kB transferred (1.2MB)
default: 2.0MB transferred (8.5MB)

Then I tried it from Firefox Focus on my iPhone SE (comparable to iPhone 6S) and both pages seemed to perform about the same as I scrolled around. I even set Photon to compact mode so it looked a bit more like the default Lemmy UI. My only other remark is it seemed to have an issue on Photon's compact mode where the page displayed was longer than the actual content, so a lot of white space trailed at the bottom.

I only learned of Photon from your comment and I have to say it's pretty impressive as a front end with only 9 months of dev time on it. I'm partial to it because I'm also right now working on a project in Svelte designed with the same idea: to do a better version of something which already exists.

P.S. Just saw this amazingly coincidental post about how web pages are mega bloated these days. https://lemmy.ml/post/13314292

[-] makotech222@hexbear.net 2 points 8 months ago

Thank you for the report. thats good to know.

this post was submitted on 16 Mar 2024
206 points (100.0% liked)

technology

23313 readers
115 users here now

On the road to fully automated luxury gay space communism.

Spreading Linux propaganda since 2020

Rules:

founded 4 years ago
MODERATORS