hhmx.de

· Föderation EN Mi 18.09.2024 05:54:59

@sil FYI, I'm working on reducing disk space usage on Phanpy. Turns out the service worker cache are never cleared properly 😩

Föderation EN Mi 18.09.2024 09:37:03

@cheeaun no worries. I removed the app and re-added it, which took about one minute, and that reduced the size. Good to hear that the underlying size is being fixed though; a gigabyte is a lot of storage to be using! So thank you for that!

Föderation EN Mi 06.11.2024 00:54:23

@cheeaun just to follow up on this, I checked my backup size again and phanpy was back up to 1.5GB. So I removed the home screen bookmark and added it again, which only took about one minute, but I wanted to report back; you may still be working on fixing this and if so no worries (as I say, it wasn't hard to recover from!) but I thought you'd like to know it's still going on in case you were thinking it was fixed already.

Föderation EN Mi 06.11.2024 03:23:12

@sil oh, thanks for the follow-up! This is very helpful.

The current site now has a timed interval to clear (SW) cache, but it only runs when "idle" (not interacting with the page for a period of time). I suspect it never becomes "idle" on your phone 🫣

I'll add some debugging UI to further investigate this (dev site already has it but I supposed you're using the stable site). Still weird that there's no way to see how much disk space a PWA use on iOS, and no UI to clear them per PWA 😩

Föderation EN Mi 06.11.2024 09:33:49

@cheeaun yeah, I just never tear myself away from phanpy, this is true :-)

It is annoying that you can't see how much space a PWA is using, I agree. Literally the only way I know is to check the size of the .webclip in a full backup, which is very awkward. I have filed a feedbackassistant, but we never find out if that gets acted on. Can you know inside phanpy how much space it's taking up? I'm not sure. I can use the dev site to test if that would help; where's that?

Föderation EN Mi 06.11.2024 11:08:00

@sil the only way I can know how much space taken is on desktop Chrome, devtools β†’ Application β†’ Storage. I've tried connecting the PWA on iPhone to Safari devtools β†’ Storage, it doesn't say how much space it's using.

Dev site is on dev.phanpy.social/ - the debugging section is hidden under the empty space below About section. Sizes are not calculated but at least can see how many cache keys are stored.

Föderation EN Mi 06.11.2024 11:22:56

@cheeaun gist.github.com/ebidel/188a513 seems to work usefully for me, which grabs a blob of all cached resources and sums the sizes. But I'm not sure where phanpy is storing stuff and maybe it's in indexeddb or something. (I'd test this on ios in the devtools, but because I reinstalled the PWA it doesn't have a big cache to test any more!)

Föderation EN Do 07.11.2024 05:35:50

@sil thanks! Added button for the cache sizes check - doesn't seem to match the numbers I'm seeing on Chrome devtools, didn't really dig further into it but I guess it's still better than nothing 😬

Föderation EN So 10.11.2024 22:12:52

@cheeaun a report: I’m running the dev version and the show cache size button doesn’t seem to do anything on my iPhone. The show cache keys button works.

Föderation EN Mo 11.11.2024 16:20:23

@sil what's the current dev version you're running on? It wasn't working for a while (for some reason, only on Mobile Safari), I tried fixing it and should be working now, else it should show another error.

Föderation EN Mo 11.11.2024 17:42:16

@cheeaun aha! 2024.11.10.62dc2ca works and I get a value, so apologies, that’s been fixed!

Föderation EN Mo 11.11.2024 18:01:48

@cheeaun @sil Looking at the debugging… wondering if fetch-home-* fields could be used in diagnosing a slow instance, or are those numbers apt to mislead?

Föderation EN Di 12.11.2024 02:19:45

@timbray possibly but could be slow connection/network too.

The whole bunch of fields there was me desperately trying to find out why the app start-up time became slow (only on Mobile Safari). Turns out it was due to the very huge Service Worker cache, as I had this PWA installed way earlier than anyone and the caching strategies were changed a number of times since the beginning.