logoalt Hacker News

Neywinyyesterday at 6:22 PM2 repliesview on HN

Can you elaborate? The header meaning the top part of the page? I just checked on a recent repo I visited and it has the usual banner (which would stay the same), the repo path, some links, and some stats. Considering every page navigation would likely pull which links and stats are shown, why is this a delta to go to another repo and why are presumably 3 database entries (possible links, stars, forks) so slow?


Replies

ezfeyesterday at 6:35 PM

Navigation within a repository does not reload the page, only the section below the header.

show 1 reply
mvdtnzyesterday at 6:45 PM

I can't speak for GitHub but I've worked on multiple nav headers for large SaaS products and they can be ridiculously heavy weight to render given they appear on every page. They tend to be a dumping ground for features, many of which require their own permissions checks, feature flag checks, etc. it's not unusual to have to perform hierarchical permissions checks. They also tend to contain contextual info about the current nav state and dynamic information about navigable states.

A lot of this can be cached but it's easy to see why moving from one repo to another will invalidate most or all permission checks and feature flag checks.

show 2 replies