freebsd-update improvement idea

I intended to share it after I have the chance to test it more. There is no use if I've made a mistake and blocked updates from happening, for example.
I have yet to test the obvious case of when an update is available which I will do at some point with a fresh install.
I expect it to work without issue but need to verify this first.
 
Client side: It takes too long to run freebsd-update, so long it's actually rather absurd. freebsd-update fetch ~1m20s (rpi3+, maybe that's halved on fast hardware) but it's still extremely high for each run, just to check! The method I'm proposing would be a single web request that would take less than ~100ms from most 1st world countries (if there's nothing to do - see above, method already explained).

Server side: The update servers would no longer serve the metadata each time, only when it is necessary. I don't work for FreeBSD so I'm not privy to how much benefit but it would definitely reduce load.

Of the two the significant benefit is seen on the client side.
How many times per day do you run freebsd-update? It's actually meant to be run every few weeks or so, 1 minute or 100 ms it does not make any practical difference. Also, if you run it frequently it's actually faster because it has to apply only few patches. Try it!
 
How many times per day do you run freebsd-update? It's actually meant to be run every few weeks or so, 1 minute or 100 ms it does not make any practical difference. Also, if you run it frequently it's actually faster because it has to apply only few patches. Try it!
This is why I initially asked about the OP's motivation for this. A response was provided by OP:

It isn't about "speed", it is about reducing unnecessary inefficiency. It's that simple.

My underlying goal was to get freebsd-update fetch be more efficient when there are no updates. Originally I proposed a grandiose idea and that was just an idea (grandiose in that I never had any expectation anyone else would come to the party).

So.

What happened in reality: I did some experimenting with freebsd-update and found I could achieve most of my goal with no additional external aspect.

When there are no updates I've taken freebsd-update fetch from 15s down to 0.7s (that's on SSD, I'm yet to see what it does on the Raspberry Pi 3 (my prediction 1m20s down to ~5s).

I've reduced unnecessary inefficiency. I'm happy.

While I overall agree with roccobaroccoSC (hence I asked the question initially) I do think that OP's point is valid. Might just be a fun project for the sake of personal satisfaction - with the potential of leaving a mark if anything valuable comes out of it!
 
Back
Top