3 ms·
You get it "for free" if you load up the repo and check some files. That's not free at all. In fact, loading a file by name from a Git repo is rather expensive
by remram 4y ago
You get it "for free" if you load up the repo and check some files. That's not free at all.
In fact, loading a file by name from a Git repo is rather expensive, and is definitely not the way their CDN should be keeping things in cache (gotta load ref, uncompress and parse commit object, uncompress and read tree object(s), just to get the blob's hash. Every one of those objects is both deflated and delta-encoded.)
- joshspankit 4y agoNono: don't do it at lookup, set the etag when the repo is pushed. I'm open to the idea that it's less computation to simply hash the files instead of deflate and decide, but my point was the hash is already calculated on the client when the changed file is added to the repo.