patch-file instead of downloading the entire binary
Please bear with me because pamac is one of the fastest package managers out there, but this issue could increase its speed logarithmically.
Back in the stone age when I was a kid, dinosaurs still roamed the Earth, the only silicon we had were rocks and you had to bang these rocks together yourself and a 2400 BAUD modem was a luxury,
In detail, that meant that a .pat was basically a binary diff between the major release and that point release, I.E. go to location 10000 insert 25 bytes, go to location 20000, remove 5 bytes, go to the end and add 128 bytes (when binaries were 1K-64K).
From this point forward, the word "binary" means any file that is not text, so regardless whether it's an ELF, lib, package, ...
Scenario:
- When you will release Manjaro 21.0.0, all users download all the binaries they need like today.
- From that point forwards you keep compiling and pulling updates as before
- Before releasing, you add a process creating .pat when releasing to the development branch (DEV).
- Users who update frequently (most) only download the diff
- Users who skip major updates, download the last major binary and the last diff.
Advantages:
- Disks are cheap, bandwidth is expensive
- Disk usage will go down too because when you go from DEV to unstable to testing to staging to stable, only the .pat file gets copied.
- Most updates change only a tiny fraction of their source: logarithmic speed improvement downloading patches.
- Most of the time patching will take less disk/CPU time than an entire decompress
Disadvantages:
- More CPU to calculate all the community diffs
- AUR will still need full binaries until Arch catches up to Manjaro
- Sometimes patching takes slightly more disk access as seeks and deletes and inserts are needed instead of a straight decompress. (CPU stays very low compared to a decompress)
- Guillaume Benoit lands a job at the Linux foundation and re-implements the same in .c instead of.vala and disappears from the Manjaro project.
☹
Why has no one ever thought of bringing this (very old) technology back?
If you want to DM me to discuss this further, visit me here because I long into GitHub infrequently as I'm not a developer (any more).
P.S. En plus, je parle Français!