mainpostsannouncesoft/projmiscstorage

you know what I hate?

2023/08/10 4:39 PM (UTC -5) | tildearrow

GitHub's "hot load" feature. it's a feature that exists for the sake of existing, and brings no benefits whatsoever.

here's how it works.
you open GitHub.
you open a repo.
then you click on anything. literally anything. Issues, Pull requests, Discussions, whatever. anything.

instead of triggering a load, a blue custom progress bar appears, which is the "hot load" mechanism.
basically it updates the page without having to reload (the usual way).
supposedly this should reduce bandwidth usage as it only loads a small portion of the page rather than the whole document.

the only problem is that when it fails, it triggers a normal reload (hereby referred as "cold load").

you see the problem? you see the problem here????

look. with a normal loading mechanism, a page load goes like this:

click -> GET /page -> (wait) -> 200 OK -> (display page)

but with this useless "hot load" crap, when it fails, it does this:

click -> GET /partial/page -> (wait) -> 404 Not Found -> GET /page -> (wait) -> 200 OK -> (display page)

you see now? it adds ONE MORE load to the process, thereby increasing LOADING TIME and totally nullifying the point of hot load!

on the visual side, you see TWO loading bars on mobile, or one blue loading bar that suddenly disappears because it cold loaded.
yeah, it's so subtle, but it really, REALLY annoys me.

why do you even have a hot load mechanism if it's going to fail? what's the POINT!

now why does it fail?
apparently this feature is stateful. this means that GitHub must keep some state about the user's last action in order for hot load to work.
this state storage is apparently FLUSHED at random. maybe because the user's been on the same page for too long... maybe because GitHub employees are busy and constantly pushing new versions... who knows.
but see? when it's flushed, hot load fails and it has to cold load instead.
stateful hot load is a horrible way to implement it. why couldn't you simply serve a portion of the body without caring about state? hot load literally involves erasing the body and inserting a new one. why is STATE even needed?!?!?!

or better yet, why not get rid of hot loading altogether? I have tested forced cold load (by disabling JavaScript), and let me tell you: the amount of time that it takes to load the page is the SAME as the time it takes when hot load is used.

SO WHY HAVE THIS FEATURE AT ALL? just so you guys could scream "OH YEAH WE GOT FANCY LOADING BAR"?

now why doesn't adding tags, assigning issues or commenting trigger a hot load? see? you CAN do stateless hot load...